(handler)
Add a handler to the internal cleanup list using a weak reference.
Add a handler to the internal cleanup list using a weak reference.
Add a handler to the internal cleanup list using a weak reference .
def _addHandlerRef(handler):
    """
    Add a handler to the internal cleanup list using a weak reference.
    """
    _acquireLock()
    try:
        _handlerList.append(weakref.ref(handler, _removeHandlerRef))
    finally:
        _releaseLock()
def _addHandlerRef ( handler ) : _acquireLock ( ) try : _handlerList . append ( weakref . ref ( handler , _removeHandlerRef ) ) finally : _releaseLock ( )