3 ms·
(this only works if destructors/finalizers don't exist). You still need runtime type information if you want to be able to properly clean up a thing. E.g. what
by Manishearth 11y ago
(this only works if destructors/finalizers don't exist). You still need runtime type information if you want to be able to properly clean up a thing. E.g. what would happen if I put a `std::vector` on the GC heap?
- scott_s 11y agoIt works just fine with destructors and finalizers, as this is the underlying implementation of explicit memory allocation. One can build a true type-aware object system on top of it. This is how C++ does it. Please note that I am talking about techniques for explicit memory management, not garbage collection.
- Manishearth 11y agoOh, you were talking about a non-GC situation. Right.