[gDesklets] 0.36.[3, 4] memory leak, a.k.a. memory growth after reloading a desklet



Hi gdesklets developers,

I recently made a comment on the memory leak issues (see buglist on launchpad). Since I don't know how often changes in the bugreports are recognized by you, the developers, or whether or not you get automatically informed about comments on already open bugs, I wanted to ask you about your opinion about my findings regarding Bug #190894 and #19840.

I already discussed this issue in short several months ago with Bjoern Koch. At that time I experienced several gigs of RAM leaking with two desklets displayed on my screen and some days of uptime. Back then, Bjoern suggsted me to look at a recent change in utils/render.c (revision 142). There I found that despite changing gdk_pixbuf_scale_simple() to be called everytime function render_to_image() is entered, the memory occupied by the resulting GdkPixbuf *scale still gets free'd only, when one of width or height of the image changed. This then results in a possible loss of the pointer to the scaled image when the function returns and along with that in memory leaks. When I installed the new beta of 0.36.4 some days ago, I experienced these memory leaks again. Thus, I had a look into the sources and saw that this issue of not unreferencing the scaled image when its size did not change is still present in the current sources.
Is there any reason for that?

Maybe one of you can have a look at the code, I also posted a patch in the bug reports comments that simply comments out the condition that checks for changed width || height.

After I applied this patch to my running version of gdesklets, some days of uptime and several desklets that change their appearance every 500ms, it seems that the mysterious memory leak is gone for me!

So maybe one of you can check if this is true in general and possibly you can fix this before releasing version 0.36.4?

Kind regards

Ronny





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]