3 ms·
> Since creating an object requires specifically allocating it on the heap, having it destruct when the pointer leaves scope is no good. It is actually possibl
by vilya 15y ago
> Since creating an object requires specifically allocating it on the heap, having it destruct when the pointer leaves scope is no good.
It is actually possible for compilers to help out with this in many cases:
http://en.wikipedia.org/wiki/Escape_analysis http://en.wikipedia.org/wiki/Escape_analysis