[fpc-pascal] Implementing a true Singleton - Can we decrease the visibility of a method?

Micha Nelissen micha at neli.hopto.org
Fri Dec 8 19:05:15 CET 2006


Michael Van Canneyt wrote:
>> Try this.
>> http://bdn.borland.com/article/22576

NewInstance/FreeInstance is what I would have recommended as well.

> Maybe we should include an implementation in FPC by default ?

How ? The article works as-is AFAIK.

Btw, I think singletons are nonsense too. Why is a global variable evil,
and a singleton class not ?

Micha



More information about the fpc-pascal mailing list