On 6/1/07, Alvise Nicoletti <[EMAIL PROTECTED]> wrote:
I have only one note... I get a segmentation fault the first time I used
it cause there was a destructor that was freeing the class itself
without checking if it was assigned (a check was useless in the "normal"
way of using it).
Without seeing the code it is difficult to spot the error. No a side
note - you are allowed to call MyObject.Free, even if MyObject wasn't
assigned (instance created) before. Internally .Free does the '= nil'
check for you.
That's why you can add the .Free line in the "finalization" section,
even if the Singleton wasn't used
<snip>
finalization
uMySingleton.Free;
<snip>
--
Graeme Geldenhuys
General error, hit any user to continue.
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives