[Qt-interest] does QT have a garbage collector ?

Oliver.Knoll at comit.ch Oliver.Knoll at comit.ch
Wed Mar 4 20:21:26 CET 2009


Sriram Durbha wrote on Wednesday, March 04, 2009 8:05 PM:

> I came across this point in the freely available book at
> http://www.qtrac.eu/C++-GUI-Programming-with-Qt-4-1st-ed.zip  ..
> Chapter 3: Section Using Dialogs [ about page 63.. ] You might want
> to go through that book also along with the references cited above. -

Quoting from that book:

"Creating modal dialogs (and context menus in QWidget::contextMenuEvent()
reimplementations) on the stack is a common programming pattern since
we usually don't need the dialog (or menu) after we have used it, and it will
automatically be destroyed at the end of the enclosing scope."

That's pretty much the lesson learned from my given example, no? ;)

Thanks anyway for the link!

Cheers, Oliver
-- 
Oliver Knoll
Dipl. Informatik-Ing. ETH
COMIT AG - ++41 79 520 95 22



More information about the Qt-interest-old mailing list