[Lazarus] Multiple LCL instances
Michael Schnell
mschnell at lumino.de
Fri Jun 11 12:04:06 CEST 2010
On 06/11/2010 11:36 AM, Mattias Gaertner wrote:
> The LCL uses various global variables.
>
That of course will prevent creating multiple instances. (In fact a
shortcoming of the current design, but of course multiple
"application"/GUI instances might be a rarely requested feature.)
But if the parts are linked separately (e.g. when doing a DLL / .so) the
global variables will exist with each instance, while the memory space
is shared and it should be possible to use a common heap, so that access
to instances of all classes should be possible from the "main"-threads
attached to any instance of the LCL.
OTOH, it might be possible to hook to the address space of another
process to share the heap and thus all instances of user defined
classes. Madshi's "MadRemote" seems to do something like this for
Delphi/Windows.
-Michael
More information about the Lazarus
mailing list