Posts

Showing posts with the label @

Pointers In Delphi

Every data we use in an application is stored somewhere in the computer's memory. And a Pointer is a variable that stores a address of memory piece  where we store data, like in Delphi "a string is really just a pointer" or "an object is really just a pointer" or "event  handler such as OnClick is actually a pointer to a procedure". They allow direct access to memory, enabling complex data structures to be built and navigated. The advantages are: We can set that memory size as per our requirement In case of copy value of a variable from one to another we just need to change a pointer to point to a different address of memory which saved lots of time When we use Pointers The most common use for pointers in Delphi is when calling Windows APIs. Windows API functions use a number of data types that may be unfamiliar to the Delphi programmer. Most of the parameters in calling API functions are pointers to some data type.  Most of the time pointers in Delphi...