[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-perl
Subject:    Re: [Kde-perl] Error in Qt::Table::text(i, j), Qt::TableItem::text().
From:       Ashley Winters <jahqueel () yahoo ! com>
Date:       2005-06-02 9:04:04
Message-ID: 20050602090404.99346.qmail () web50901 ! mail ! yahoo ! com
[Download RAW message or body]

--- Alexey Dashevsky <alex@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 
_______________________________________________
Kde-perl mailing list
Kde-perl@kde.org
https://mail.kde.org/mailman/listinfo/kde-perl
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic