The DocumentLifeCycleHandler allows adding on_session_destroyed callbacks to a Document, which works pretty well. However if a single callback fails for whatever reason other callbacks won't be called. Additionally the references to the callbacks themselves may be prevent references from being collected, therefore the handler should delete the callbacks once it is done with them.
The DocumentLifeCycleHandler allows adding on_session_destroyed callbacks to a Document, which works pretty well. However if a single callback fails for whatever reason other callbacks won't be called. Additionally the references to the callbacks themselves may be prevent references from being collected, therefore the handler should delete the callbacks once it is done with them.