On Dec 10, 2008, at 10:14 PM, Peter Johnson wrote: > 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.
Hi, thanks for the report, I'll take a look at it and see if I can't find fix. - Morten _______________________________________________ Qt4-preview-feedback mailing list [email protected] http://lists.trolltech.com/mailman/listinfo/qt4-preview-feedback
