Storage may be deallocated (released) manually, or you can leave it to the system to do it automatically.
Automatic on procedure exit
Programmer can deallocate space manually
about to exit after exit
with UNCHECKED_DEALLOCATION;
procedure main is
type T is ... ; -- type definition
type T_ptr is access T;
procedure deallocate_T is new
unchecked_deallocation (T,T_ptr);
PT : T_ptr;
begin
...
PT := new T; -- allocate from heap
...
deallocate_T (PT); -- return to heap
...
end;