• Home
  • Raw
  • Download

Lines Matching refs:finalizer

58 weak reference, since the module automatically ensures that the finalizer
240 Return a callable finalizer object which will be called when *obj*
241 is garbage collected. Unlike an ordinary weak reference, a finalizer
245 A finalizer is considered *alive* until it is called (either explicitly
247 finalizer returns the result of evaluating ``func(*arg, **kwargs)``,
248 whereas calling a dead finalizer returns :const:`None`.
250 Exceptions raised by finalizer callbacks during garbage collection
256 When the program exits, each remaining live finalizer is called
260 A finalizer will never invoke its callback during the later part of
283 Property which is true if the finalizer is alive, false otherwise.
438 to register a callback without needing to preserve the returned finalizer
451 The finalizer can be called directly as well. However the finalizer
464 >>> f() # callback not called because finalizer dead
465 >>> del obj # callback not called because finalizer dead
467 You can unregister a finalizer using its :meth:`~finalize.detach`
468 method. This kills the finalizer and returns the arguments passed to
482 :const:`False`, a finalizer will be called when the program exits if it
534 A more robust alternative can be to define a finalizer which only references
550 Defined like this, our finalizer only receives a reference to the details
552 garbage collected the finalizer will still be called at exit.
566 If you create a finalizer object in a daemonic thread just as the program
567 exits then there is the possibility that the finalizer