[Kde-perl] Error in Qt::Table::text(i, j), Qt::TableItem::text().
Ashley Winters
jahqueel at yahoo.com
Thu Jun 2 11:04:04 CEST 2005
--- Alexey Dashevsky <alex at kpgaz.chernigov.ua> 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
More information about the Kde-perl
mailing list