Open neilconway opened 12 years ago
No, not quite.
The call chain is tick -> start -> do_startup -> init_signal_handling -> register bud instance.
But in start ,the operative line is do_startup unless @bud_started
Not sure what you mean -- yes, tick effectively does an implicit start if the Bud instance isn't started yet. start
without stop
leaks resources.
Ah, I see. I interpreted your earlier statement to mean that there is some resource leakage every single time tick is called.
If you create a Bud instance, call
tick
on it, and then neglect to callstop
, there is a resource leak. This is becausetick
adds the Bud instance to the global list of Bud instances, and we only remove the instance from the list onstop
.This could be fixed by calling
stop
after eachtick
, but we'd need to restructure the code so that the appropriate state is retained betweentick
calls (e.g., we don't want to close/truncate persistent tables on every tick).