3 ms·
"Are library implementers still required to use Unchecked_Deallocation?" Unchecked_Deallocation has more in it than just returning storage to the system, it al
by guerby 5y ago
"Are library implementers still required to use Unchecked_Deallocation?"
Unchecked_Deallocation has more in it than just returning storage to the system, it also triggers Finalization:
http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-13-11-2.html http://www.ada-auth.org/standards/rm12_w_tc1/html/RM-13-11-2...
"when X is not equal to null first performs finalization of the object designated by X (and any coextensions of the object ...)"
So even if your compiler target has automatic memory management (eg: JVM) you will still use Unchecked_Deallocation if you want to control when Finalization occurs.