memory release
Deutsch · English
Shared objects
- Destroy releases the storage space (an object).
- Free checks whether the object reference is nil. If the object reference is not nil, the storage space (the object) is released. This procedure prevents exceptions when releasing the storage space.
- Nil deletes the reference to an object. Note: The object should be released beforehand, otherwise so-called memory leaks occur.
- FreeAndNil works like Free and afterwards sets the object reference (the pointer) to nil.
Pointers
- Dispose releases the memory for typed pointers that were created with New.
- FreeMem releases the memory for untyped pointers that were created with GetMem.
From the Free Pascal wiki, page "memory release", as it stood on 2020-02-12 after a change by Trev, out of the wiki's dump of 2024-05-26. Copyright stays with the author who wrote it, according to the old wiki's Licensing page. If you have concerns about this material, message the admin.
Talk about this page
Nobody has opened a bench for this page yet. Sign in to open one.
