During windows development, or in fact any similar apps, use the FreeInstance method or DelphiVCL.Application.FreeInstance to deallocate memory allocated by a previous call to the NewInstance method.
All destructors call FreeInstance automatically to deallocate memory that was allocated by overriding NewInstance.
Do not call FreeInstance directly. FreeInstance should be overridden if NewInstance was overridden to change the way the object’s instance data was allocated.
Like NewInstance, FreeInstance uses the value returned from InstanceSize to deallocate the object’s memory.
Let’s browse all the properties and methods of the DelphiVCL.Application.FreeInstance using dir() command:
1 2 3 |
import DelphiVCL dir(DelphiVCL.Application.FreeInstance) |
See the responses in our Windows command prompt:
You can also read short information about the DelphiVCL.Application.FreeInstance using the print() command:
1 2 |
print(DelphiVCL.Application.FreeInstance) print(DelphiVCL.Application.FreeInstance.__doc__) |
See the responses in our Windows command prompt:
Check out DelphiVCL which easily allows you to build GUIs for Windows using Python.
Watch this comprehensive introduction to Python GUI Development with DelphiVCL library video by Jim McKeeth: