Aekold Helbrass wrote:
> Hi All!
> 
> Few days ago I developed QMenu showing on hotkey for one of my apps,
> and I noticed one problem - each time I constructed QMenu my
> application took more and more RAM without freeing it. I used close()
> method to hide QMenu, something similar should work in Swing when
> you're just disposing window with components tree and they're
> available for garbage collection. Now I am using single QMenu instance
> just hiding/showing it, but I'd like to know for the future - what is
> the best way to make QWidget collectable?

Hi,

You can call dispose() on the widget once you are done with it. This is 
currently recommended for all toplevels once you are completely done 
with them. There is a thread a few months back with memory management 
explaining the full details of why...

best regards,
Gunnar

_______________________________________________
Qt-jambi-interest mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt-jambi-interest

Reply via email to