diff options
author | Simon Schampijer <simon@schampijer.de> | 2007-09-03 08:32:50 (GMT) |
---|---|---|
committer | Simon Schampijer <simon@schampijer.de> | 2007-09-03 08:32:50 (GMT) |
commit | b1cc46bf78800d018a5045210db2888684ce49eb (patch) | |
tree | 8a1aa446f069f5ee3be976cf9c49228ee203910b /linkbutton.py | |
parent | 08d650a1b46df5002cc8eb71d0cb3a6d47a87960 (diff) |
fixed memory consuption when creating shared links
by calling the garbage collector
Diffstat (limited to 'linkbutton.py')
-rw-r--r-- | linkbutton.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/linkbutton.py b/linkbutton.py index 5716812..8b2e478 100644 --- a/linkbutton.py +++ b/linkbutton.py @@ -21,6 +21,7 @@ import gobject from gettext import gettext as _ import rsvg import re +import gc from sugar.graphics.palette import Palette from sugar.graphics.tray import TrayButton @@ -67,6 +68,9 @@ class LinkButton(TrayButton, gobject.GObject): img.set_from_pixbuf(pixbuf_bg) self.set_icon_widget(img) img.show() + del pixbuf + del pixbuf_bg + gc.collect() def _read_link_background(self, filename, fill_color, stroke_color): icon_file = open(filename, 'r') |