If I understand correctly, gtk_widget_destroy also removes the widget from any containers, so gtk_container_remove call (like in my commit) is not needed, so this fix is better than mine.
Now, regarding the problem mentioned by Alberts — that commit is linked to bug 1045372, which describes how to trigger the issue. Sebastian, will you be able to test it?
This reminds me that I had a very similar fix in https:/ /bazaar. launchpad. net/~mitya57/ indicator- applet/ remove- old-menuitems/ revision/ 436 that was fixing memory leak described in bug 1635577 (see comments #26 and #27), but I never created a merge proposal for it because it was fixed on owncloud-client side. (applet-main.c was renamed to indicator-applet.c since then, so it is the same code.)
If I understand correctly, gtk_widget_destroy also removes the widget from any containers, so gtk_container_ remove call (like in my commit) is not needed, so this fix is better than mine.
Now, regarding the problem mentioned by Alberts — that commit is linked to bug 1045372, which describes how to trigger the issue. Sebastian, will you be able to test it?