On 6/24/99, 12:23:53 PM, Harri Porten wrote regarding Re: Tracking allocated memory (was: Tracking memory leaks -- advice needed): > Pietro Iglio wrote: > > > > However, it seems that there is another memory leak in > > KPanel::setLabelDate(), in line: > > > > label_date->setText(QString(dayline)+QString(timeline)+QString(dateline)); > > > > Can anyone explain why this command is leaving unfreed memory? Is it a > > Qt memory leak? > I'm currently debugging the 1.1. branch so my answer might not be > correct for your question: > Yes. set_label_date() leaks. But not due to the above line. It's the > QToolTip::add() that allocates too much memory on each call under > certain circumstances (I've sent an example to snapshot-users@troll.no > last night). I suspect that the routine should restrain from calling > connecting a signal to the widget each time. The fix I had on my disk > help with the example program but not with kpanel (that has more tool > tips as you said above). What you say is true: QToolTip::add() is causing a memory leak. But, according to dmalloc's alloc_current, also the label_date->setText(...) line is leaving unfreed memory around (HEAD branch, Qt-2.0beta1). If you are able to compile and run kpanel from the HEAD branch, could you (or anyone else) confirm that? -- Pietro