D19485: Fixes leak of DolphinFileMetaDataWidget in ToolTipManager

David Hallas noreply at phabricator.kde.org
Sat Mar 9 17:58:28 GMT 2019


hallas added inline comments.

INLINE COMMENTS

> elvisangelaccio wrote in tooltipmanager.cpp:85-86
> Why `reset()` it twice? The second `reset()` call should be enough

I was just trying to mimic the original behavior. If there is only a single reset then there will be a short period of time where two DolphinFileMetaDataWidget instances are allocated because first the new DolphinFileMetaDataWidget is allocated, then it it passed to the reset function, which deletes the instance it owns and keeps the new one. A standard way of avoiding this is simply to call reset first without any arguments, then the original instance is deleted before the new one is allocated.

But I can change it to a single reset call, what do you think?

REPOSITORY
  R318 Dolphin

REVISION DETAIL
  https://phabricator.kde.org/D19485

To: hallas, #dolphin, elvisangelaccio
Cc: kfm-devel, alexde, feverfew, spoorun, navarromorales, firef, andrebarros, emmanuelp, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20190309/98ce7d13/attachment.htm>


More information about the kfm-devel mailing list