Next: , Previous: Pragma Linker_Constructor, Up: Implementation Defined Pragmas

Pragma Linker_Destructor


     pragma Linker_Destructor (procedure_LOCAL_NAME);

procedure_local_NAME must refer to a parameterless procedure that is declared at the library level. A procedure to which this pragma is applied will be treated as a finalization routine by the linker. It is equivalent to __attribute__((destructor)) in GNU C and causes procedure_LOCAL_NAME to be invoked after the entry point of the executable has exited (or immediately before the shared library is unloaded if the procedure is linked in a shared library), in particular after the Ada run-time environment is shut down.

See pragma Linker_Constructor for the set of restrictions that apply because of these specific contexts.