Re: [Vala] Gdk.RGBA in text tag - possible leak?



Gesendet: Montag, 18. Mai 2015 um 16:12 Uhr
Von: "Al Thomas"

From: Gilzad Hamuni
In the uploaded example I simply print
"tag.foreground_rgba.to_string()" to stdout, which constantly raises
the use of the memory. Skipping this step will keep the usage at a static level
[3].

I'll be glad about any hint. Let me know if I can do anything.
I don't understand why you have a weak reference:

weak Gdk.RGBA tmpColor = Gdk.RGBA();

outside of your loop that uses the reference. See
https://wiki.gnome.org/Projects/Vala/ReferenceHandling

As a hint I would try removing 'weak':

Gdk.RGBA tmpColor = Gdk.RGBA();

Thanks Al,

if I understand correctly, then there's no use for 'weak' there as the scope for that declaration ends with 
the program. But it doesn't affect the memory consumption in the loop. I really went ahead and removed it now 
just to be sure. Still reading from "tag.foreground_rgba" consumes more memory through the loop.

Best,

gilzad


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