Hi Carlos,
On Tue, Feb 2, 2010 at 1:43 PM, Roger <[email protected]> wrote:
> On Tue, Feb 2, 2010 at 6:01 AM, Carlos Galisteo <[email protected]> wrote:
>> I've done some superficial tests on this issue and despite it seems to
>> be confirmed, the increased amount of memory is far from being 'huge'.
>>
>> I'll perform more intensive tests and inform upstream.
>>
>> Could you please provide quantitative details in order to compare them
>> with my own results?
>
> I launched qwit with the following settings:
>
> * http proxy set
> * update interval: 30s
> * refresh search results
>
> I kept it open for about 2 hours and a suspend/resume happened during
> that time (not sure whether suspend/resume has anything to do with
> this)
>
> memory consumption shown in 'top':
> begin: VIRT 200+m, RES 80+m
> after 2hrs: VIRT 449m, RES 326m and still climbing
>
> at some point in this time the memory start climbing up faster I think.
>
Today I found the leak. Patch attached.
After running for a hour the VIRT remains < 150m and RES < 40m. It's
climbing *very* slowly but much better than unpatched.
Would you please forward it to upstream?
Thanks in advance.
Roger
diff -ur qwit-1.0-beta-src.0/src/TwitterWidgetItemMessage.cpp qwit-1.0-beta-src/src/TwitterWidgetItemMessage.cpp
--- qwit-1.0-beta-src.0/src/TwitterWidgetItemMessage.cpp 2009-10-27 00:32:03.000000000 +0800
+++ qwit-1.0-beta-src/src/TwitterWidgetItemMessage.cpp 2010-02-09 16:20:46.958383477 +0800
@@ -42,6 +42,10 @@
languagesMenu = Translator::getInstance()->createLanguagesMenu(actionLanguage);
}
+TwitterWidgetItemMessage::~TwitterWidgetItemMessage() {
+ delete languagesMenu;
+}
+
void TwitterWidgetItemMessage::contextMenuEvent(QContextMenuEvent *event) {
QMenu *menu = createStandardContextMenu(event->pos());
menu->addMenu(languagesMenu);
diff -ur qwit-1.0-beta-src.0/src/TwitterWidgetItemMessage.h qwit-1.0-beta-src/src/TwitterWidgetItemMessage.h
--- qwit-1.0-beta-src.0/src/TwitterWidgetItemMessage.h 2009-10-25 02:05:23.000000000 +0800
+++ qwit-1.0-beta-src/src/TwitterWidgetItemMessage.h 2010-02-09 16:20:02.942384724 +0800
@@ -43,6 +43,7 @@
public:
TwitterWidgetItemMessage(QWidget *parent, const Message &message);
+ virtual ~TwitterWidgetItemMessage();
void insertTranslation(const QString &text);
protected: