Pygobject memory leak in set_property?
- From: Colin Myers <colin myers tabernus com>
- To: "gtk-app-devel-list gnome org" <gtk-app-devel-list gnome org>
- Subject: Pygobject memory leak in set_property?
- Date: Thu, 1 Jan 2015 21:38:42 +0000
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
[Date Prev][
Date Next] [Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]