3 ms·
Smart pointers won't save you. Yes, they'll eliminate the need for collection, by moving the overhead from a single collection to ever construction/destruction
by outworlder 12y ago
Smart pointers won't save you.
Yes, they'll eliminate the need for collection, by moving the overhead from a single collection to ever construction/destruction.
This may be worth it to get a constant framerate, but the overhead doesn't disappear. If anything, it could be greater: allocating from the heap usually costs more than an object allocation done by any sane VM.
- angersock 12y agoConstant framerate, even with overhead, can be preferable to random slowdowns.
- Skinney 12y agoThe way you guarantee constant framerate in both a GCed or manual environment is the same: arenas/regions/pools/buffers. Manual memory management is susceptible to memory fragmentation, which can severely slow down allocation.