Lines Matching refs:finalizer
58 weak reference, since the module automatically ensures that the finalizer
241 Return a callable finalizer object which will be called when *obj*
242 is garbage collected. Unlike an ordinary weak reference, a finalizer
246 A finalizer is considered *alive* until it is called (either explicitly
248 finalizer returns the result of evaluating ``func(*arg, **kwargs)``,
249 whereas calling a dead finalizer returns :const:`None`.
251 Exceptions raised by finalizer callbacks during garbage collection
257 When the program exits, each remaining live finalizer is called
261 A finalizer will never invoke its callback during the later part of
284 Property which is true if the finalizer is alive, false otherwise.
445 to register a callback without needing to preserve the returned finalizer
458 The finalizer can be called directly as well. However the finalizer
471 >>> f() # callback not called because finalizer dead
472 >>> del obj # callback not called because finalizer dead
474 You can unregister a finalizer using its :meth:`~finalize.detach`
475 method. This kills the finalizer and returns the arguments passed to
489 :const:`False`, a finalizer will be called when the program exits if it
538 A more robust alternative can be to define a finalizer which only references
554 Defined like this, our finalizer only receives a reference to the details
556 garbage collected the finalizer will still be called at exit.
570 If you create a finalizer object in a daemonic thread just as the program
571 exits then there is the possibility that the finalizer