Hacker News new | past | comments | ask | show | jobs | submit login

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.

I was simply stating that RAII does not solve the memory fragmentation issues. Many GC's do solve the memory fragmentation issue.

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact