3 ms·
RAII has nothing to do with memory fragmentation. Solving memory fragmentation requires moving objects around. Usually you get that via a moving (or compactin
by eru 8y ago
RAII has nothing to do with memory fragmentation.
Solving memory fragmentation requires moving objects around. Usually you get that via a moving (or compacting) garbage collector. But there's no reason RAII style resource allocation couldn't move things around.
And there are plenty of garbage collection strategies that don't move objects around.
- Patient0 8y agoI was simply stating that RAII does not solve the memory fragmentation issues. Many GC's do solve the memory fragmentation issue.