Memory Leak when doing Reload()
Stefan Strobl <[email protected]> Wed, 07 Oct 2009 21:38:35 +0200
| Newsgroups | gmane.comp.kde.devel.konq-e |
|---|---|
| Organization | Gersys GmbH |
| Message-ID | <[email protected]> |
This is a multi-part message in MIME format.
--------------040101040906070309050707
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Hi
I'm having trouble with a memory leak when doing reloads. I've been
searching for over a week now but am not getting any closer. Could
anyone please help me with this issue? Maybe you can try if your system
behaves the same?
I applied attached patch to konq-e-0.2-20040524 to be able to trigger a
reload externally. I'm then using the attached program in main.cpp which
does the triggering (via QCopChannel).
A simple test page of 2,4kB size causes a leak of about 476kB after a
100 reloads.
I'm cross-compiling for ppc, using qte-3.3.4 and this is my configuration:
./configure --host=ppc-linux --enable-embedded --enable-qt-embedded
--without-arts --disable-pcre --disable-debug --disable-mt
--enable-fontsubs --enable-xmlui --enable-final --prefix=/home/konq-e
--exec-prefix=/home/konq-e
--with-extra-includes=$QTDIR/src/3rdparty/libjpeg
--with-extra-libs=$QTDIR/src/3rdparty/libjpeg --with-ipv6-lookup=n
Many thanks
Stefan.
--------------040101040906070309050707
Content-Type: text/x-patch;
name="reload.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="reload.patch"
--- konqueror3-embedded-0.2-20040524.orig/konq-embed/src/view.h 2003-03-17 21:49:02.000000000 +0100
+++ konqueror3-embedded-0.2-20040524/konq-embed/src/view.h 2009-10-07 20:09:51.000000000 +0200
@@ -31,6 +31,8 @@
#include <kparts/factory.h>
#include <kaction.h>
+#include <qcopchannel_qws.h>
+
class QMainWindow;
class KHTMLPart;
class HTMLView;
@@ -226,6 +228,8 @@ protected:
KAction *m_back;
KAction *m_forward;
+ QCopChannel *m_trigger;
+
private:
void setScaling( KHTMLPart *frame );
--- konqueror3-embedded-0.2-20040524.orig/konq-embed/src/view.cc 2003-05-27 18:08:25.000000000 +0200
+++ konqueror3-embedded-0.2-20040524/konq-embed/src/view.cc 2009-10-07 20:02:52.000000000 +0200
@@ -241,6 +241,11 @@ BrowserView::BrowserView( const QString
m_doc->browserExtension()->setBrowserInterface( m_browserIface );
m_goBuffer = 0;
+
+ /* trigger reload() externally */
+ m_trigger = new QCopChannel("extTrigReload", this);
+ QObject::connect( m_trigger, SIGNAL(received(const QCString&,const QByteArray&)),
+ this, SLOT(reload()) );
}
BrowserView::~BrowserView()
--------------040101040906070309050707
Content-Type: text/x-c++src;
name="main.cpp"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="main.cpp"
/*
* konq Trigger
*
* sending QCopChannel "extTrigReload" causes
* patched konqueror browser to reload its view
*/
#include <qapplication.h>
#include <qcopchannel_qws.h>
int main( int argc, char **argv )
{
QApplication a( argc, argv );
QCopChannel ch("myTrigger");
QCopChannel::send("extTrigReload", "\0");
return 0;
}
--------------040101040906070309050707
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline
_______________________________________________
konq-e mailing list
[email protected]
https://mail.kde.org/mailman/listinfo/konq-e
--------------040101040906070309050707--