Skip to content

fix: Finalize AvatarBox correctly

mesonium requested to merge mesonium/gajim:fix-one-memory-leak-avatarbox into master

Widgets will remove all event controllers automatically when they are destroyed, however, the GestureClick still hold a reference to the connected function leading to a leak.

Test Plan

  1. Open Gajim with export GAJIM_LEAK=1
  2. Open a chat
  3. Switch between this chat and another chat

There are several ways to measure the impact: I've checked both htop (reserved memory column) and used memray. Here are the numbers for the latter:

  • Before: I've roughly measured 1.4 MB per switch between Gajim's and Conversation's MUC
  • After: 0.4 MB leak per chat switch

averaged over 50 switches.

Edited by mesonium

Merge request reports

Loading