Skip to content
This repository has been archived by the owner on Mar 6, 2024. It is now read-only.

Commit

Permalink
Let source event keep a hard ref to operator to prevent garbage colle…
Browse files Browse the repository at this point in the history
…ction of operator, fixes #9
  • Loading branch information
erdewit committed Dec 9, 2023
1 parent db3423b commit 0a44f2b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eventkit/ops/op.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,8 @@ def _connect_from(self, source: Event):
source.connect(
self.on_source,
self.on_source_error,
self.on_source_done)
self.on_source_done,
keep_ref=True)

def _disconnect_from(self, source: Event):
source.disconnect(
Expand Down

0 comments on commit 0a44f2b

Please sign in to comment.