Re: [glade--] Could raw C++ pointers be eliminated?

Christof Petig <[email protected]> Wed, 20 Oct 2004 12:33:54 +0200
Newsgroups gmane.comp.gnome.glademm
Organization Adolf Petig GmbH & Co. KG
Message-ID <[email protected]>
Murray Cumming schrieb:
>>Murray Cumming schrieb:
>>
>>>Yes, RefPtr<> is not a general purpose smartpointer. But there are
>>>plenty
>>>of other general purpose smartpointers that can be used with gtkmm.
>>
>>So (if I read correctly between the lines) you advise me to use
>>auto_ptr<> inside the ctor (and the class)?
> 
> 
> I hate auto_ptr<>. I generally prefer shared reference-counting
> smartpointers.
> 
> But I personally see no great advantage for you in doing this instead of
> using Gtk::manage().

achieving exception safe ctors would be the only reason to do so (and 
auto_ptr seems to cover that field). It should be noted that plain Gtkmm 
Widgets never throw an exception in their ctor, so it's only an issue 
with custom widgets (which are rarely used within glade [except by me]). 
So this would not lead me into action unless someone presses me to go.

    Christof

_______________________________________________
glademm-list mailing list
[email protected]
http://mail.gnome.org/mailman/listinfo/glademm-list
signature.asc (application/pgp-signature, 251 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Debian - http://enigmail.mozdev.org

iD8DBQFBdj8Yng+R+0ucfO0RAuIrAKCQi9U+Oo2FR3qJfPflKrYFa/8uawCffyAk
UEaIwDLaTApyvUo2IPosXTc=
=ae1B
-----END PGP SIGNATURE-----