TICS Coding Standard Viewer 
TIOBE Software Quality Framework
Print-friendly version
©TIOBE Software www.tiobe.com
 
C++ Coding Standard
Search

Rule:  OAL#004

Synopsis:In case allocated memory has to be deallocated later by someone else, it should be clearly documented
Language:C++
Severity Level:1
Category:Object Allocation


Description:

For example, a method or function that allocates memory and returns it to its caller to be deallocated later. In this case, the caller should be aware of the fact that it becomes the owner of the allocated memory. When this is not clearly documented, it increases the chance for memory leaks, because the caller may not be aware that the memory should be deallocated after usage.



Literature References:
Ellemtel Rec. 58