Next: , Previous: , Up: Implementation Defined Pragmas   [Contents][Index]


2.115 Pragma No_Heap_Finalization

Syntax:

pragma No_Heap_Finalization [ (first_subtype_LOCAL_NAME) ];

Pragma No_Heap_Finalization may be used as a configuration pragma or as a type-specific pragma.

In its configuration form, the pragma must appear within a configuration file such as gnat.adc, without an argument. The pragma suppresses the call to Finalize for heap-allocated objects created through library-level named access-to-object types in cases where the designated type requires finalization actions.

In its type-specific form, the argument of the pragma must denote a library-level named access-to-object type. The pragma suppresses the call to Finalize for heap-allocated objects created through the specific access type in cases where the designated type requires finalization actions.

It is still possible to finalize such heap-allocated objects by explicitly deallocating them.

A library-level named access-to-object type declared within a generic unit will lose its No_Heap_Finalization pragma when the corresponding instance does not appear at the library level.