Commits

Kirill Simonov  committed c4519bb

Fixed an issue with adapters being garbage collected.

  • Participants
  • Parent commits ac6d506

Comments (0)

Files changed (1)

File src/htsql_tweak/override/__init__.py

     def __init__(self, app, attributes):
         super(TweakOverrideAddon, self).__init__(app, attributes)
         self.unused_pattern_cache = UnusedPatternCache()
+        self.globals_cache = []
         for name, parameters in sorted(self.globals):
-            self.globals[name, parameters].register(app, name, parameters)
+            adapter = self.globals[name, parameters].register(app, name,
+                                                              parameters)
+            self.globals_cache.append(adapter)
 
     def validate(self):
         validate()