DelphiDelphiVCLPythonPython GUIWindows

What is the NewInstance Method in DelphiVCL.Application?

What is the newinstance method in DelphiVCL.Application?

NewInstance or DelphiVCL.Application.NewInstance method allocates memory for an instance of an object type and returns a pointer to that new instance.

All constructors call NewInstance automatically. NewInstance calls InstanceSize to determine how much memory containing a particular instance to allocate from the heap. Do not call NewInstance directly.

How to use the DelphiVCL.Application.NewInstance Method properly?

Override NewInstance only for special memory allocation requirements. For example, when allocating a large number of identical objects that all need to be in memory at the same time, you can allocate a single block of memory for the entire group, then override NewInstance to use part of that larger block for each instance.

If you override NewInstance to allocate memory, you may need to override FreeInstance to deallocate the memory.

Note: By default, NewInstance calls InitInstance.

Let’s browse all the properties, methods, and built-in properties of the DelphiVCL.Application.NewInstance using dir() command:

See the responses in our Windows command prompt:


You can also read short information about the DelphiVCL.Application.NewInstance using the print() command:

See the responses in our Windows command prompt:



Check out DelphiVCL which easily allows you to build GUIs for Windows using Python.

Related posts
DelphiDelphiVCLPythonPython GUIWindows

This Is The DelphiVCL.Application.Minimize Method

DelphiDelphiVCLPythonPython GUIWindows

Learn About DelphiVCL.Application.HandleMessage In Python

DelphiDelphiVCLPythonPython GUIWindows

What Is The GetParentComponent Method in DelphiVCL.Application?

DelphiDelphiVCLPythonPython GUIWindows

All You Need To Know About GetNamePath Method in DelphiVCL.Application

Leave a Reply

Your email address will not be published. Required fields are marked *