-
Notifications
You must be signed in to change notification settings - Fork 1
Description
As you correctly stated, @felixkol, when creating a second project, the previous one is not freed as expected, causing the internal marker server to continue publishing keep-alive messages. This is probably due to circular references.
I tried to explicitly call python's garbage collector via gc.collect(), which cleans dangling circular references. However, this triggers a segfault down the line.
I'm afraid that the issue is related to trait-widget bindings. The function trait_widget_binding establishes a bidirectional binding, possibly storing references in both created classes, WidgetTraitBinding and TraitWidgetBinding, like in this toy example.
By the way, why are these classes not stored somehow? Are they just used to establish the binding?
stack_of_tasks/python/stack_of_tasks/ui/traits_mapping/bindings.py
Lines 136 to 137 in 2695a5f
| WidgetTraitBinding(hasTrait, traitName, widget, propname, set_trait_post) | |
| TraitWidgetBinding(hasTrait, traitName, widget, propname, set_widget_post) |
Here, the Logic_Project is passed to trait_widget_binding:
stack_of_tasks/python/stack_of_tasks/ui/application.py
Lines 321 to 326 in 2695a5f
| trait_widget_binding( | |
| self, | |
| "solver_cls", | |
| self.ui_window.tab_widget.solver.solverClassComboBox, | |
| set_widget_post=True, | |
| ) |