Ask HN: Is RAII sufficient for memory management?
In C++ the RAII idiom is common for managing memory. Any resources(such as heap memory or files) needed are acquired in the constructor of an object and releases in the object's constructor. Since stack-allocated objects destroyed automatically upon leaving scope this ensures that the resources are released.
Are there any memory management scenarios for which this is insufficient and for which garbage collection is necessary?Are there any other memory management techniques(other than GC, RAII, or manual memory management) which would be more effective for those scenarios?