• Home
  • Raw
  • Download

Lines Matching refs:finalizer

58 weak reference, since the module automatically ensures that the finalizer
246 Return a callable finalizer object which will be called when *obj*
247 is garbage collected. Unlike an ordinary weak reference, a finalizer
251 A finalizer is considered *alive* until it is called (either explicitly
253 finalizer returns the result of evaluating ``func(*arg, **kwargs)``,
254 whereas calling a dead finalizer returns :const:`None`.
256 Exceptions raised by finalizer callbacks during garbage collection
262 When the program exits, each remaining live finalizer is called
266 A finalizer will never invoke its callback during the later part of
289 Property which is true if the finalizer is alive, false otherwise.
450 to register a callback without needing to preserve the returned finalizer
463 The finalizer can be called directly as well. However the finalizer
476 >>> f() # callback not called because finalizer dead
477 >>> del obj # callback not called because finalizer dead
479 You can unregister a finalizer using its :meth:`~finalize.detach`
480 method. This kills the finalizer and returns the arguments passed to
494 :const:`False`, a finalizer will be called when the program exits if it
546 A more robust alternative can be to define a finalizer which only references
562 Defined like this, our finalizer only receives a reference to the details
564 garbage collected the finalizer will still be called at exit.
578 If you create a finalizer object in a daemonic thread just as the program
579 exits then there is the possibility that the finalizer