On Friday, 27. April 2001 22:46, Don Sanders wrote: > On Friday 27 April 2001 16:47, Denis Perchine wrote: > > Hello, > > > > Read a CVS message, that memory leak was fixed in KHTML. > > And thought that this will finally fix the problem with memory leak when > > reading mails. But it is not the case. When I go to the next message > > approximately 100 kbytes is leaked. At least KMail grows in size. Even > > when I came back to the same message it grows. > > > > Also it grows by approx. 200K when I right click on the item, and get > > popup menu. Possibly this is a problem of kdelibs... But this is really > > unacceptable. After a day of work KMail use 100-150Mb of memory. > > > > Any ideas? > > It's updateMessageMenu again. Just "return;" in > KMMainWin::updateMessageMenu() to verify that yourself. > > Maybe there was always a memory leak there, maybe it is much more of a > problem now as maybe updateMessageMenu is called much more often than it > used to be. Maybe it was only called on right click or when clicking on the > message menu but now it is (more or less) called whenever a message is > read. > > IMO obviously updateMessageMenu should only be called on right click of a > message header or when the message menu is pulled down. Coolo any chance of > you agreeing on this? > > BTW html widget looks ok, adding a "return;" to the start of void > KMReaderWin::setMsg(KMMessage* aMsg, bool force) didn't make any memory > leaks obvious. > > Heh, who needs leaktracer. I tried kmalloc and the real big leaks are indeed within khtml. [157000 bytes in 7850 blocks, 1st. block is 20 bytes at 0x0a40e1d8] 0x413c38af libc.so.6(malloc+0x2f) 0x4131ef49 libstdc++-libc6.2-2.so.3(__builtin_new+0x29) 0x40331e61 libkhtml.so.3(khtml::CSSOrderedPropertyList::append(DOM::CSSStyleDeclarationImpl *, unsigned int, unsigned int, khtml::Source, khtml::Source)+0x115) 0x40331cec libkhtml.so.3(khtml::CSSStyleSelectorList::collect(QList *, khtml::CSSOrderedPropertyList *, khtml::Source, khtml::Source)+0xf4) 0x403313c5 libkhtml.so.3(khtml::CSSStyleSelector::buildLists(void)+0x6d) 0x4032f3f9 libkhtml.so.3(khtml::CSSStyleSelector::CSSStyleSelector(DOM::DocumentImpl *)+0x159) 0x402d77e6 libkhtml.so.3(DOM::HTMLDocumentImpl::HTMLDocumentImpl(KHTMLView *)+0xc2) 0x4028bd7e libkhtml.so.3(KHTMLPart::begin(KURL const &, int, int)+0x386) 0x080e38db kmreaderwin.cpp:549(KMReaderWin::parseMsg(void)) 0x080e3254 kmreaderwin.cpp:494(KMReaderWin::updateReaderWin(void)) folderToPopupMenu leaks too, but not _that_ large: [18200 bytes in 26 blocks, 1st. block is 700 bytes at 0x0a1190a0] 0x413c38af libc.so.6(malloc+0x2f) 0x4125f8f6 libX11.so.6(_XimLocalCreateIC+0x86) 0x4123457b libX11.so.6(XCreateIC+0x4b) 0x40df9db8 libqt.so.2(QWidget::createTLSysExtra(void)+0x160) 0x40e823c7 libqt.so.2(QWidget::createTLExtra(void)+0x137) 0x40e84b9c libqt.so.2(QWidget::focusData(bool)+0x64) 0x40e81b39 libqt.so.2(QWidget::QWidget(QWidget *, char const *, unsigned int)+0x305) 0x40eb5c69 libqt.so.2(QFrame::QFrame(QWidget *, char const *, unsigned int, bool)+0x29) 0x40f189c8 libqt.so.2(QPopupMenu::QPopupMenu(QWidget *, char const *)+0x34) 0x0808eab7 kmmainwin.cpp:1967(KMMainWin::folderToPopupMenu(KMFolderTreeItem *, bool, QObject *, QMap *, QPopupMenu *)) 0x0808ec96 kmmainwin.cpp:1995(KMMainWin::updateMessageMenu(void)) The QPopupMenu created there seems to leak, but I can't really see how, but I added a parent to it, so it doesn't leak. Greetings, Stephan -- People in cars cause accidents. Accidents in cars cause people. _______________________________________________ Kmail Developers mailing list Kmail@master.kde.org http://master.kde.org/mailman/listinfo/kmail