Re: [Re: [[gtkmm] Glib::RefPtr also for Widgets?]]



>> I do it exactly this way and it works fine. I think it's the easiest
>> solution to manage non-modal dialogs and windows.
>
>Personally I think it's easier to just hide() dialogs when you don't want
>them. I like to delete things at the same level at which they are new-ed.
In
>fact, I prefer to use member instances anyway. But these are general C++
>issues, not gtkmm issues.

It would not be the best solution in my app. User may open multiple
dialogs for searching files at the same time, and when search is finished
this dialog is useless. If I just hide it it might be treated as a memory
leak. For single dialog with a flag: visible/invisible you're right,
hiding is good idea. But for multiple dialogs that are created dynamically
just calling 'delete this;' is a good idea I think.

Jarek


----------------------------------------------------------------------
Wykorzystaj mnie... >>> http://link.interia.pl/f1654





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