CertC++-MEMΒΆ
Memory Management
Nested Rules
Do not access freed memory |
|
Free dynamically allocated memory when no longer needed |
|
Only free memory allocated dynamically |
|
Allocate sufficient memory for an object |
|
Do not modify the alignment of objects by calling realloc() |
|
Do not access freed memory |
|
Properly deallocate dynamically allocated resources |
|
Detect and handle memory allocation errors |
|
Explicitly construct and destruct objects when manually managing object lifetime |
|
Provide placement new with properly aligned pointers to sufficient storage capacity |
|
Honor replacement dynamic storage management requirements |
|
Do not store an already-owned pointer value in an unrelated smart pointer |
Options
Setting an option for this rule means setting the default for all nested rules.
This rule shares the following common options: exclude_in_macros, exclude_messages_in_system_headers, excludes, extend_exclude_to_macro_invocations, includes, justification_checker, languages, post_processing, provider, report_at, severity
The following places define options that affect this rule: Stylechecks, Analysis-GlobalOptions
This rule has no individual options.