5 ms·
For safe resource finalization, Ada provides `Ada.Finalization.Controlled`. This enables you to implement RAII, smart pointers, and other ways of safe finalizat
by flyx86 10y ago
For safe resource finalization, Ada provides `Ada.Finalization.Controlled`. This enables you to implement RAII, smart pointers, and other ways of safe finalization. `Ada.Unchecked_Deallocation` is just the bare-metal tool you can implement more intelligent finalization with (because in the end, someone needs to deallocate the memory).
- catnaroek 10y agoWithout substructural types, no matter how much lipstick you put on the pig, use after free will always be possible.