This rule is Obsolete | |
Synopsis: | Do not use "delete" to delete raw pointers inside smart pointers |
Language: | C++ |
Severity Level: | 1 |
Category: | Object Allocation |
Description: |
All smart pointers are wrappers around raw pointers. The raw pointer can be obtained from the smart pointer via the "get" method. This raw pointer should never be deleted, because memory is managed automatically by the enclosing smart pointer. |