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



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

Attachment: signature.asc
Description: OpenPGP digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]