-
Notifications
You must be signed in to change notification settings - Fork 71
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Call unregister
for garbage collected events made by AddHandler
.
#270
Comments
That's a good point. 🤔 I will look into it. |
I have a question regarding reactimate (foo bar <$> eBaz) Suppose there is no other references to |
Not at the moment, unfortunately, but eliminating events that are provably |
I see, how about event eAct <- switchE (act <$ eSignal) (never <$ eFree)
reactimate eAct but it does not when eAct <- act <$ switchE eSignal (never <$ eFree)
reactimate eAct So, |
Unfortunately, not — the optimization about
Yes, |
Can I ask why |
That's a good question — there are two ways in which garbage collection could operate: Either the source keeps events alive or the sink keeps them alive. I felt that I had to decide for one, and picked the sink, as this plays better with dynamic event switching: We can create many events that stem from the same source, which are at some point in their life cycle connected to a sink, but then |
Somehow I thought it was opposite! I guess this means each |
Depends on what you mean by "overhead". The evaluation of events still proceeds by pushing from the source; so if the event does not reach a sink, it does not add overhead in the evaluation. That said, the sink does keep events alive, so that in that sense, it adds overhead. As said, implementing "optimizing |
I found that
unregister
is not called when events are GC-ed.In fact, the
unregister
functionality is discarded entirely infromAddHandler
call.Could you make it so that it calls
unregister
on GC, so relevant widgets and signal generators could be properly garbage-collected?The text was updated successfully, but these errors were encountered: