I've found what appears to be a memory leak in the 4.5-tp1 release and  
looks like it is still in recent snapshots.  This is the Carbon build  
of Qt.

In qwidget_mac.mm, in QWidgetPrivate::update_sys(const QRegion &rgn),  
it calls:

         HIViewSetNeedsDisplayInRegion(qt_mac_nativeview_for(q),  
rgn.handle(true), true);

rgn.handle(true) calls QRegion::toQDRgn() in qregion_mac.cpp.

QRegion::toQDRgn() allocates memory on the heap with the Carbon API  
NewRgn() and returns that RgnHandle.

It doesn't appear that QRegion keeps track of a Carbon RgnHandle  
internally to clean up when the QRegion goes away, and obviously the  
code in qwidget_mac doesn't keep track of and clean up the RgnHandle.

If I have a flash animation playing, for example, this happens  
constantly and I leak about 100KB/minute.

_______________________________________________
Qt4-preview-feedback mailing list
[email protected]
http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback

Reply via email to