No_Finalization (GNAT Reference Manual) (original) (raw)
5.1.31 No_Finalization ¶
[GNAT] This restriction disables the language features described in chapter 7.6 of the Ada 2005 RM as well as all form of code generation performed by the compiler to support these features. The following types are no longer considered controlled when this restriction is in effect:
Ada.Finalization.Controlled
Ada.Finalization.Limited_Controlled
- Derivations from
Controlled
orLimited_Controlled
- Class-wide types
- Protected types
- Task types
- Array and record types with controlled components
The compiler no longer generates code to initialize, finalize or adjust an object or a nested component, either declared on the stack or on the heap. The deallocation of a controlled object no longer finalizes its contents.