The objects created by new-expressions (objects with dynamic storage duration) persist until the pointer returned by the new-expression is used in a matching delete-expression. If the original value of pointer is lost, the object becomes unreachable and cannot be deallocated: a memory leak occurs.
A example of Memory leaks
原文:https://www.cnblogs.com/ShadowDomain/p/11441565.html