>>>>> "Juergen" == Juergen Spitzmueller <[EMAIL PROTECTED]> writes:
Juergen> I'm not sure if this is related, but valgrind also reports Juergen> some leaks which look like they are related to font handling Juergen> (I do not really understand its output, so I might be wrong). Juergen> Attached is the report of: (a.) starting LyX, (b.) new doc, Juergen> (c) type "Hello", (d) quit. ==15243== at 0x1B904718: operator new(unsigned) (in /usr/lib/valgrind/vgpreload_memcheck.so) ==15243== by 0x1CDE8CB6: ??? ==15243== by 0x1BD66329: QInputContextFactory::create(QString const&, QWidget*) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.4) This one seems to be in code related to the immodule patch. ==15243== at 0x1B9045A4: malloc (in /usr/lib/valgrind/vgpreload_memcheck.so) ==15243== by 0x1C31FAFF: XGetFontPath (in /usr/X11R6/lib/libX11.so.6.2) ==15243== by 0x824EF3E: qfont_loader::addToFontPath() (qpaintdevice.h:332) This one is real: see attached patch. ==15243== at 0x1B904718: operator new(unsigned) (in /usr/lib/valgrind/vgpreload_memcheck.so) [...] ==15243== by 0x1C1DD0F5: std::string::string(char const*, std::allocator<char> const&) (in /usr/lib/libstdc++.so.5.0.5) ==15243== by 0x809F571: LyXAction::init() (LyXAction.C:359) Not sure about this the code seems correct. ==15243== 13921 (100 direct, 13821 indirect) bytes in 1 blocks are definitely lost in loss record 261 of 376 ==15243== at 0x1B9045A4: malloc (in /usr/lib/valgrind/vgpreload_memcheck.so) ==15243== by 0x1CDF1484: create_oc (in /usr/X11R6/lib/X11/locale/lib/common/xomGeneric.so.2) ==15243== by 0x1C354EE0: XCreateOC (in /usr/X11R6/lib/libX11.so.6.2) ==15243== by 0x1C353E74: XCreateFontSet (in /usr/X11R6/lib/libX11.so.6.2) ==15243== by 0x1CDE7AE4: ??? ==15243== by 0x1CDE8BE5: ??? ==15243== by 0x1BD66329: QInputContextFactory::create(QString const&, QWidget*) (in /usr/lib/qt3/lib/libqt-mt.so.3.3.4) In immodule again. ==15243== at 0x1B904718: operator new(unsigned) (in /usr/lib/valgrind/vgpreload_memcheck.so) ==15243== by 0x8213B90: Timeout::Timeout(unsigned, Timeout::Type) (qtTimeout.C:20) This one is real too. See patch. The last one seems immodule-specific too. I'll apply the patch. JMarc
Index: src/frontends/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/ChangeLog,v retrieving revision 1.282 diff -u -p -r1.282 ChangeLog --- src/frontends/ChangeLog 31 May 2005 14:40:30 -0000 1.282 +++ src/frontends/ChangeLog 16 Jun 2005 09:37:48 -0000 @@ -1,3 +1,7 @@ +2005-06-16 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * Timeout.C (~Timeout): properly delete the pimpl on deletion. + 2005-05-31 Martin Vermeer <[EMAIL PROTECTED]> * screen.[hC]: better fix, processEvents -related screen update Index: src/frontends/Timeout.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/Timeout.C,v retrieving revision 1.12 diff -u -p -r1.12 Timeout.C --- src/frontends/Timeout.C 9 Sep 2003 17:25:26 -0000 1.12 +++ src/frontends/Timeout.C 16 Jun 2005 09:37:48 -0000 @@ -17,6 +17,7 @@ Timeout::~Timeout() { pimpl_->stop(); + delete pimpl_; } Index: src/frontends/qt2/ChangeLog =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/ChangeLog,v retrieving revision 1.792 diff -u -p -r1.792 ChangeLog --- src/frontends/qt2/ChangeLog 10 Jun 2005 14:53:42 -0000 1.792 +++ src/frontends/qt2/ChangeLog 16 Jun 2005 09:37:48 -0000 @@ -1,3 +1,8 @@ +2005-06-16 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> + + * qfont_loader.C (addToFontPath): delete the data structure + allocated by XGetFontPath. + 2005-06-09 Jean-Marc Lasgouttes <[EMAIL PROTECTED]> * qfont_loader.h: Index: src/frontends/qt2/qfont_loader.C =================================================================== RCS file: /usr/local/lyx/cvsroot/lyx-devel/src/frontends/qt2/qfont_loader.C,v retrieving revision 1.54 diff -u -p -r1.54 qfont_loader.C --- src/frontends/qt2/qfont_loader.C 10 Jun 2005 14:53:42 -0000 1.54 +++ src/frontends/qt2/qfont_loader.C 16 Jun 2005 09:37:48 -0000 @@ -63,6 +63,7 @@ void qfont_loader::addToFontPath() char ** p = XGetFontPath(w.x11Display(), &n); if (std::find(p, p + n, dir) != p + n) return; + XFreeFontPath(p); lyxerr[Debug::FONT] << "Adding " << dir << " to the font path." << endl; string const command = "xset fp+ " + QuoteName(dir);