Re:Honey, I shrunk {fmt}: bringing binary size to 14k and di...
by Someone on Sunday September 01, 2024 @02:04PM
(#41418893)
That doesn’t help for C++ if you allocated an array of objects with destructors. It has to know that you allocated 23 objects, so that it can call 23 destructors, not 32 ones, 9 of which on uninitialized memory.
[ Parent
| on HN ]
Re:Honey, I shrunk {fmt}: bringing binary size to 14k and di...
by jeffbee on Sunday September 01, 2024 @02:24PM
(#41419044)
I believe the question was more around how the program knows how much memory to deallocate. The compiler generates the destructor calls the same way the compiler generates everything else in the program.