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

From: Martin Klaffenboeck <martin.klaffenboeck_at_gmx.at>
Date: Sun, 06 Nov 2005 21:39:32 +0100

Am Samstag, den 05.11.2005, 10:36 -0800 schrieb George:
> 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.

Thanks thats a great Idea, I will follow this consistency.

Martin

Received on Sun Nov 06 2005 - 20:38:26 CST

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