RE: Pygobject memory leak in set_property?
- From: Colin Myers <colin myers tabernus com>
- To: Gergely Polonkai <gergely polonkai eu>
- Cc: gtk-app <gtk-app-devel-list gnome org>
- Subject: RE: Pygobject memory leak in set_property?
- Date: Fri, 2 Jan 2015 21:29:14 +0000
Yes, the memory increase is in proportion with the size of the text.
But it is more likely to be an error in my understanding than a pygobject or gtk bug – this is usually the
case…
Regards,
Colin
From: Gergely Polonkai [mailto:gergely polonkai eu]
Sent: 02 January 2015 08:18
To: Colin Myers
Cc: gtk-app
Subject: Re: Pygobject memory leak in set_property?
Hello,
How big is the memory increase? set_text() allocates memory for text, which might be the cause.
Best,
Gergely
On 1 Jan 2015 22:55, "Colin Myers" <colin myers tabernus com<mailto:colin myers tabernus com>> wrote:
Hello list,
I've been wrangling with a leak in my Pygobject/Gtk application and believe the following lines of python
demonstrate the problem:
from gi.repository import Gtk
cell = Gtk.CellRendererText()
text = 'Hello world'
while True:
cell.set_property('text', text)
No new python objects are allocated in the loop but top shows growing memory. Similarly I found this leaks:
label = Gtk.Label()
text = 'Hello world'
while True:
label.set_property('label', text)
But this does not:
label = Gtk.Label()
text = 'Hello world'
while True:
label.set_text(text)
I feel like I am missing something obvious, please help!
Regards,
Colin
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list gnome org<mailto:gtk-app-devel-list gnome org>
https://mail.gnome.org/mailman/listinfo/gtk-app-devel-list
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]