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



Cumming External comneon com schrieb:
Sorry, my murrayc.com email isn't working right now, so I'm replying off
list.


Murray: Any problems left when storing widget references in RefPtrs left?

Yes, I told you already that RefPtr is not a general-purpose
smartpointer. Use something else.
Hmmm. Agreed. Hmmm. But ...

Is it suitable enough to be used as a pointer to Gtk::Widgets? E.g. to make a ctor exception safe (destructing all already generated widgets) and destructing (non managed) member widgets in the dtor?
I have no special preference for any smart pointer; I consider boost 
overkill (to impose on every user of glademm).
So when RefPtr is not suitable it looks like storing pointers to widgets 
within my UI classes is the best choice (and optionally using auto_ptr 
or something similar to make the ctor exception safe)
Discussion ending here concluding that C pointers are again the way to 
go for glademm (unless someone proposes a universally available and 
viable smart pointer to me).
   Christof

Attachment: signature.asc
Description: OpenPGP digital signature



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