Re: [gob-list] Get only one object of a class?

From: George <>
Date: Sat, 5 Nov 2005 10:36:38 -0800

On Sat, Oct 29, 2005 at 10:09:43PM +0200, Martin Klaffenboeck wrote:
> Can I simply add a static variable inside the new function which is set
> to null the first time and gets set to the GnotexSupport pointer
> afterwards and if it is not null to return the so stored pointer?

That is how you would do it. I would also not name the method 'new' but
'get' to be consistent with how other such objects are usually done.


George <>
   Men willingly believe what they wish.
                       -- Julius Caesar
Received on Sat Nov 05 2005 - 18:36:41 CST

This archive was generated by hypermail 2.2.0 : Sun Apr 17 2011 - 21:05:02 CDT