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



Gesendet: Mittwoch, 20. Mai 2015 um 02:22 Uhr
Von: "Nor Jaidi Tuah" 

You have found a Vala bug.

g_object_get (_tmp26_, "foreground-rgba", &_tmp27_, NULL);

From
https://developer.gnome.org/gobject/unstable/gobject-The-Base-Object-Type.html#g-object-get

--snip----
void
g_object_get (gpointer object,
              const gchar *first_property_name,
              ...);

Gets properties of an object.

In general, a copy is made of the property contents and the caller is
responsible for freeing the memory in the appropriate manner for the
type, for instance by calling g_free() or g_object_unref().
--endsnip----

Thanks Nor and Al,

based on your help I filed a bug now:
https://bugzilla.gnome.org/show_bug.cgi?id=749651


Gesendet: Mittwoch, 20. Mai 2015 um 01:07 Uhr
Von: "Al Thomas"
Are you saying the if you don't manually clear
the buffer's tag table and its text you get a second memory leak? From what I  
understand you have done the work and found the line that causes the leak. So there
is no need to continue freeing the buffer manually?

If the text buffer grows without me clearing it, then that would be normal. But subjectively I expect that by 
clearing the buffer its tag table should be cleared as well, which doesn't happen. That's why I clear the tag 
table manually. I've had a brief discussion about it on the GTK mailing list.
https://www.mail-archive.com/gtk-app-devel-list gnome org/msg19188.html
It appears to be known in some way, so I'm not too sure if that's yet another/unrelated leakage.


Thanks again to both of you.

Best,

gilzad


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