hi, i've just spent some time debugging what looked like reference cycles, only to find out that timeouts keep their callbacks around even if they are cancelled, and the cancelled timers don't get consumed until all earlier timeouts fired or got cancelled.
my suggestion is for the asyncio.events.TimerHandle (probably also the generic .Handle) to set their ._callback and ._args to None when they are cancelled. this would help keeping the memory free, and would ease debugging of kept-around references. is there any reason why this should not done? if not, please consider adding `self._callback = self._args = None` to asyncio.events.Handle.cancel. best regards chrysn -- To use raw power is to make yourself infinitely vulnerable to greater powers. -- Bene Gesserit axiom
signature.asc
Description: Digital signature
