On 12/8/06, Vincent Snijders <[EMAIL PROTECTED]> wrote:
Maybe I am analyzing your output wrong, but to me it seems as if the contructor 
of
TObject is called in the third case. printdata seems to print an empty text.

So the protected contructor is unreachable, but the public constructor in 
TObject
remains public.

That's correct, which is even worse.  It gives us a half-baked object.
fData is never initialized.  Putting a writeln() statement inside
TSingleton.Create shows that on the 3rd instance it is never executed.

[graemeg-linux] singleton > ./singtest
Tsingleton.Create
PrintData
hello world
---------
Tsingleton.Create
PrintData
hello world
hello world 2
---------
PrintData



--
Graeme Geldenhuys

There's no place like S34° 03.168'  E018° 49.342'
_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-pascal

Reply via email to