Re: [UFO-devel] BoUfo widget deleter
Status: Beta
Brought to you by:
schmidtjf
From: Johannes S. <sch...@us...> - 2005-12-14 01:53:24
|
Am Freitag 02 Dezember 2005 11:51 schrieb Andreas Beckermann: [...] > > > A normal ufo::UObject that is added to the widget using trackPointer() > > > is _not_ sufficient, as this is deleted by the ufo::UObject d'tor only > > > and at this point the ufo::UWidget has already been destroyed. > > > > Just a quick question: > > Where do you actually use the UWidget pointer in your BoUfoWidget d'tor? > > If haven't found any direct access to the UWidget object here: > > http://cvs.sourceforge.net/viewcvs.py/boson/code/boson/boufo/boufowidget. > >cp p?rev=1.9&view=markup > > The deleter does not do so at all (directly). > It deletes the corresponding BoUfoWidget, which in turn uses the > ufo::UWidget pointer or related pointers. > > This for example: > http://cvs.sourceforge.net/viewcvs.py/boson/code/boson/boufo/bouforadiobutt >on.cpp?view=markup the d'tor uses the mButtonGroup pointer. That button > group is deleted by the ufo::UButton that is encapsulated by the > BoUfoWidget and therefore is deleted by the ufo::UWidget d'tor. I do not want to nitpick, but the button group is not deleted by UButton. Anyway it is probably saver to increase the reference count of the button group at creation. > Other (much more difficult to solve) examples can be found in the actual > boson code. For example in the gameview/bosongameview.cpp Sorry, still I haven't found an example, where a UWidget pointer is used in the BoUfoWidget d'tor. Regards, Johannes |