From b1cc46bf78800d018a5045210db2888684ce49eb Mon Sep 17 00:00:00 2001 From: Simon Schampijer Date: Mon, 03 Sep 2007 08:32:50 +0000 Subject: fixed memory consuption when creating shared links by calling the garbage collector --- (limited to 'linkbutton.py') 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') -- cgit v0.9.1