3 ms·
The story is similar to C++. Almost all allocations are done by types that'll automatically call free in their destructors. But because there's no global GC, it
by oconnor663 9y ago
The story is similar to C++. Almost all allocations are done by types that'll automatically call free in their destructors. But because there's no global GC, it's still possible to leak accidentally by creating a cycle in reference-counted smart pointers.
- fnord123 9y agoThere is still the other most common source of memory leaks: putting data into long living (e.g. 'static) hash tables and having no plan for pruning it.