Re: Get only one object of a class?

Martin Klaffenboeck <[email protected]> Sun, 06 Nov 2005 21:39:32 +0100
Newsgroups gmane.comp.gnome.devtools.gob.general
Message-ID <1131309572.12098.5.camel@localhost>
--=-s5OHO6o0WJuGDyNDPg7M
Content-Type: text/plain
Content-Transfer-Encoding: quoted-printable

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?
>=20
> 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

--=-s5OHO6o0WJuGDyNDPg7M
Content-Type: application/pgp-signature; name=signature.asc
Content-Description: Dies ist ein digital signierter Nachrichtenteil

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (GNU/Linux)

iD8DBQBDbmoEX9Pgnt9mM0MRAgSaAKDaod01F3QSBMUG9RU63ptebzR2EwCfcdZl
yb4lNP3rqjxmYP1itz3IF38=
=rGjB
-----END PGP SIGNATURE-----

--=-s5OHO6o0WJuGDyNDPg7M--

--
to unsubscribe:
send mail to [email protected] with "unsubscribe gob-list" in the subject