On 2013-09-15 15:57, Martin wrote: > global war, but in implementation >
Correct, or just use a "lazyman's singleton" function. ----8<-------------8<-------------8<-------------8<-------------8<---- interface function GlobalFoo: TFoo; implementation var uFoo: TFoo; function GlobalFoo: TFoo; begin if uFoo = nil then uFoo := TFoo.Create; Result := uFoo; end; initialization uFoo := nil; finalization uFroo.Free; ----8<-------------8<-------------8<-------------8<-------------8<---- Regards, - Graeme - -- fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal http://fpgui.sourceforge.net/ -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus