[libpeas] Don't run an idle Python garbage collection



commit 7b79a74d40bacd0beaad3e9b8131bef2b693f964
Author: Garrett Regier <Garrett Regier riftio com>
Date:   Mon Apr 27 09:59:00 2015 -0400

    Don't run an idle Python garbage collection
    
    Running it in an idle shouldn't be needed, this was originally
    copied from gedit's old plugin engine. This also fixes a
    weird crash under Windows.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=748075

 loaders/python/peas-python-internal.py |   16 ----------------
 1 files changed, 0 insertions(+), 16 deletions(-)
---
diff --git a/loaders/python/peas-python-internal.py b/loaders/python/peas-python-internal.py
index f8881b5..8870563 100644
--- a/loaders/python/peas-python-internal.py
+++ b/loaders/python/peas-python-internal.py
@@ -48,7 +48,6 @@ class Hooks(object):
         sys.path.insert(0, PEAS_PYEXECDIR)
         gettext.install(GETTEXT_PACKAGE, PEAS_LOCALEDIR)
 
-        self.__idle_gc = 0
         self.__module_cache = {}
         self.__extension_cache = {}
 
@@ -146,30 +145,15 @@ class Hooks(object):
         module_gtypes[gtype] = None
         return None
 
-    def __run_gc(self):
-        gc.collect()
-
-        self.__idle_gc = 0
-        return False
-
     def garbage_collect(self):
-        # We run the GC right now and we schedule
-        # a further collection in the main loop
         gc.collect()
 
-        if self.__idle_gc == 0:
-            self.__idle_gc = GLib.idle_add(self.__run_gc)
-            GLib.source_set_name_by_id(self.__idle_gc, '[libpeas] run_gc')
-
     def all_plugins_unloaded(self):
         pass
 
     def exit(self):
         gc.collect()
 
-        if self.__idle_gc != 0:
-            GLib.source_remove(self.__idle_gc)
-
 
 if os.getenv('PEAS_PYTHON_PROFILE') is not None:
     import cProfile


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