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



From: Gilzad Hamuni <gilli4 gmx net>

To: Vala-list <vala-list gnome org>
Sent: Monday, 18 May 2015, 14:19
Subject: [Vala] Gdk.RGBA in text tag - possible leak?
while accessing the color properties of a text tag, I noticed that the memory 
usage constantly goes up.

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();

Just a thought,


Al


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