From kde-perl Thu Jun 02 09:04:04 2005 From: Ashley Winters Date: Thu, 02 Jun 2005 09:04:04 +0000 To: kde-perl Subject: Re: [Kde-perl] Error in Qt::Table::text(i, j), Qt::TableItem::text(). Message-Id: <20050602090404.99346.qmail () web50901 ! mail ! yahoo ! com> X-MARC-Message: https://marc.info/?l=kde-perl&m=111770307808375 --- Alexey Dashevsky wrote: > Hello all! > > Thank for amicable silence;-) > > Has refreshed files from cvs PerlQt-3, the memory leak at plotting > the table > has stopped. But memory flows also by call of methods > Qt::Table::text(i, j), > Qt::TableItem::text(). > > This bugs will be corrected? I didn't actually try the code, but I'm pretty sure I know why it leaks. Qt.xs/VirtualMethodReturnValue line XXX: bool cleanup() { return false; } Always returning false means that virtual function return-values allocated with new() will never be deleted. In this case, that means a 'QString' gets leaked on every call. The correct function is probably: class VirtualMethodReturnValue : public Marshall { // ... bool cleanup() { return(_st.isClass() && _st.isStack()); } // ... }; Can you try that change and see if it leaks, Alexey? Ashley Winters __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ Kde-perl mailing list Kde-perl@kde.org https://mail.kde.org/mailman/listinfo/kde-perl