Re: Get only one object of a class?
George <[email protected]> Sat, 5 Nov 2005 10:36:38 -0800
| Newsgroups | gmane.comp.gnome.devtools.gob.general |
|---|---|
| Message-ID | <[email protected]> |
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. Jiri -- George <[email protected]> Men willingly believe what they wish. -- Julius Caesar -- to unsubscribe: send mail to [email protected] with "unsubscribe gob-list" in the subject