Query module AV Rule 79
- Resource not released in destructor
- All resources acquired by a class should be released by its destructor. Avoid the use of the ‘open / close’ pattern, since C++ constructors and destructors provide a safer way to handle resource acquisition and release. Best practice in C++ is to use the ‘RAII’ technique: constructors allocate resources and destructors free them.
- efficiency readability external/cwe/cwe-404 external/jsf
An expression that acquires a resource, and the kind of resource that is acquired. The kind of a resource indicates which acquisition/release expressions can be paired.
Gets the expression
An expression that releases a resource, and the kind of resource that is released. The kind of a resource indicates which acquisition/release expressions can be paired.