Quick start manual
Memory management
11-11
Internal data formats
corresponding virtual method’s entry point. This layout is compatible with a C++ v-
table and with COM. At negative offsets, a VMT contains a number of fields that are
internal to Delphi’s implementation. Applications should use the methods defined in
TObject to query this information, since the layout is likely to change in future
implementations of the Delphi language.
Class reference types
A class-reference value is stored as a 32-bit pointer to the virtual method table (VMT)
of a class.
Table 11.5 Virtual method table layout
Offset Type Description
–76 Pointer pointer to virtual method table (or nil)
–72 Pointer pointer to interface table (or nil)
–68 Pointer pointer to Automation information table (or nil)
–64 Pointer pointer to instance initialization table (or nil)
–60 Pointer pointer to type information table (or nil)
–56 Pointer pointer to field definition table (or nil)
–52 Pointer pointer to method definition table (or nil)
–48 Pointer pointer to dynamic method table (or nil)
–44 Pointer pointer to short string containing class name
–40 Cardinal instance size in bytes
–36 Pointer pointer to a pointer to ancestor class (or nil)
–32 Pointer pointer to entry point of SafecallException method (or nil)
–28 Pointer entry point of AfterConstruction method
–24 Pointer entry point of BeforeDestruction method
–20 Pointer entry point of Dispatch method
–16 Pointer entry point of DefaultHandler method
–12 Pointer entry point of NewInstance method
–8 Pointer entry point of FreeInstance method
–4 Pointer entry point of Destroy destructor
0 Pointer entry point of first user-defined virtual method
4 Pointer entry point of second user-defined virtual method
ƒƒƒ