Skip to main content
assistive.skiplink.to.breadcrumbs
assistive.skiplink.to.header.menu
assistive.skiplink.to.action.menu
assistive.skiplink.to.quick.search
Log in
Confluence
Spaces
Hit enter to search
Help
Online Help
Keyboard Shortcuts
Feed Builder
What’s new
Available Gadgets
About Confluence
Log in
SEI CERT C++ Coding Standard
Pages
Boards
Space shortcuts
Dashboard
Secure Coding Home
Android
C
C++
Java
Perl
Page tree
Browse pages
Configure
Space tools
View Page
A
t
tachments (0)
Page History
Page Information
View in Hierarchy
View Source
Export to PDF
Export to Word
Pages
…
SEI CERT C++ Coding Standard
2 Rules
Rule 06. Memory Management (MEM)
MEM51-CPP. Properly deallocate dynamically allocated resources
Page Information
Title:
MEM51-CPP. Properly deallocate dynamically allocated resources
Author:
Aaron Ballman
Dec 10, 2014
Last Changed by:
Jill Britton
Apr 20, 2023
Tiny Link:
(useful for email)
https://wiki.sei.cmu.edu/confluence/x/Gns-BQ
Export As:
Word
·
PDF
Incoming Links
SEI CERT C++ Coding Standard (5)
Page:
ERR57-CPP. Do not leak resources when handling exceptions
Page:
MEM56-CPP. Do not store an already-owned pointer value in an unrelated smart pointer
Page:
MEM53-CPP. Explicitly construct and destruct objects when manually managing object lifetime
Page:
FIO51-CPP. Close files when they are no longer needed
Page:
DCL54-CPP. Overload allocation and deallocation functions as a pair in the same scope
SEI CERT C Coding Standard (1)
Page:
WIN30-C. Properly pair allocation and deallocation functions
Hierarchy
Parent Page
Page:
Rule 06. Memory Management (MEM)
Labels
Global Labels (13)
notes
cwe-590
review-dms
nptc
review
rule
cwe-415
review-ajb
mem
cwe-762
cwe-404
nptc-aliasing
nptc-wpa
Recent Changes
Time
Editor
Apr 20, 2023 04:45
Jill Britton
View Changes
May 19, 2022 10:57
Jon O'Donnell
View Changes
Apr 27, 2022 09:20
Jill Britton
View Changes
Dec 09, 2021 09:43
Jill Britton
View Changes
Jun 25, 2021 05:52
Svyatoslav Razmyslov
View Page History
Outgoing Links
External Links (22)
https://www.sonarsource.com/products/codeanalyzers/sonarcfa…
https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
https://www.kb.cert.org/vulnotes/bymetric?searchview&query=…
https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
https://wiki.sei.cmu.edu/confluence/pages/viewpage.action?p…
cwe.mitre.org/
https://pvs-studio.com/en/docs/warnings/v611/
https://pvs-studio.com/en/docs/warnings/v515/
https://pvs-studio.com/en/docs/warnings/v701/
https://www.mathworks.com/help/bugfinder/ref/certcmem51cpp.…
https://wiki.sei.cmu.edu/confluence/display/cplusplus/PVS-S…
https://pvs-studio.com/en/docs/warnings/v748/
cwe.mitre.org/data/definitions/762.html
https://pvs-studio.com/en/docs/warnings/v773/
www.cplusplus.com/reference/memory/allocator/
https://pvs-studio.com/en/docs/warnings/v554/
cwe.mitre.org/data/definitions/590.html
www.open-std.org/jtc1/sc22/wg21/docs/lwg-active.html#2072
cwe.mitre.org/data/definitions/404.html
https://wiki.sei.cmu.edu/confluence/display/cplusplus/Polys…
https://pvs-studio.com/en/docs/warnings/v1066/
cwe.mitre.org/data/definitions/415.html
SEI CERT C++ Coding Standard (22)
Page:
BB. Definitions
Page:
Clang
Page:
Helix QAC_V
Page:
MEM53-CPP. Explicitly construct and destruct objects when manually managing object lifetime
Page:
CodeSonar_V
Page:
Axivion Bauhaus Suite_V
Page:
Parasoft
Page:
LDRA
Page:
Klocwork
Page:
Astrée_V
Page:
Helix QAC
Page:
Polyspace Bug Finder_V
Page:
Axivion Bauhaus Suite
Page:
AA. Bibliography
Page:
CodeSonar
Page:
Parasoft_V
Page:
Ldra_V
Page:
Klocwork_V
Page:
PVS-Studio_V
Page:
Clang_V
Page:
Astrée
Home page:
SEI CERT C++ Coding Standard
SEI CERT C Coding Standard (3)
Page:
MEM34-C. Only free memory allocated dynamically
Page:
MEM31-C. Free dynamically allocated memory when no longer needed
Home page:
SEI CERT C Coding Standard
Overview
Content Tools
{"serverDuration": 128, "requestCorrelationId": "42530e1456582adc"}