Problem Statement
What is a memory leak in the context of objects?
Explanation
A memory leak occurs when objects or resources (memory, file handles) are not properly released after they are no longer used. Over time this degrades system performance and may cause failures. Proper design of constructors and destructors (or finalisers) is essential to avoid leaks.
Practice Sets
This question appears in the following practice sets: