> On Jan. 29, 2011, 9:28 p.m., Raphael Kubo da Costa wrote: > > So you're saying is that on each login a new YahooAccount (which creates a > > Client) is created? Do you know what part of the code creates this object? > > My doubt is this: if the code which does this does not immediately delete > > the previous YahooAccount, then Client's destructor will not be immediately > > called and the "leak" will continue; if, OTOH, the code does delete the > > previous YahooAccount, then Client's destructor will be called, and so will > > d->root's, hence the "leak" should not happen. > > > > I also did not understand why some objects are being deleted with 'delete > > foo;' and others with 'foo->deleteLater()'. > > > > One last thing: do you know if the task objects created in methods such as > > receiveFile() are also being "leaked" this way? > > Cristi P wrote: > No, I'm not saying that. > YahooAccount object - deleted probably only when quiting kopete. Same for > the Client object. > but Client::close() is called at various times - when going offline or > networking errors. So, the pairs initTasks and close (and deleteTask) are > called at various time during lifetime of kopete - usually when switching > between offline/other status. So they both must know correctly about subtasks > being created or not - that's the missing tasksInitia... = true for - > probably original author forgot about it? > > Why using both delete and deleteLater - don't have a very good clue. > > tasks created like in receiveFile - they're being run w/ go(true) - which > means autoDelete themselves. >
Got it now. I suggest submitting a new version observing the following: * Removing the if (d->iconLoader) line; * Removing the if checks before the deleteLater lines -- if the objects are 0, QCoreApplication::postEvent will just output a warning about receiving a null post event, which is good for us, since if deleteTasks() is called, initTasks() should have been called earlier; * Since both loginTask and listTask are created in Client's constructor, persist throughout Client's entire lifetime and are automatically deleted when m_root is deleted, I don't see a need to explicitly delete them in Client's destructor. - Raphael ----------------------------------------------------------- This is an automatically generated e-mail. To reply, visit: http://svn.reviewboard.kde.org/r/6422/#review9761 ----------------------------------------------------------- On Jan. 29, 2011, 3:46 p.m., Cristi P wrote: > > ----------------------------------------------------------- > This is an automatically generated e-mail. To reply, visit: > http://svn.reviewboard.kde.org/r/6422/ > ----------------------------------------------------------- > > (Updated Jan. 29, 2011, 3:46 p.m.) > > > Review request for Kopete. > > > Summary > ------- > > while looking for cause of duplicate incoming messages problems, I found some > missing code that made program recreate some objects. > > > Diffs > ----- > > trunk/KDE/kdenetwork/kopete/protocols/yahoo/libkyahoo/client.cpp 1217129 > > Diff: http://svn.reviewboard.kde.org/r/6422/diff > > > Testing > ------- > > sending messages, sending files still work. > put some dump in constructor and destructor of a webcamtask to confirm it was > not deleting the task but just creating new ones - when reconnecting. > > > Thanks, > > Cristi > >
_______________________________________________ kopete-devel mailing list kopete-devel@kde.org https://mail.kde.org/mailman/listinfo/kopete-devel