Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix leak of IOLoopKernelManager object
After analyzing various leaked items when running either Notebook or Jupyter Kernel Gateway, one item that recurred across each kernel startup and shutdown sequence was an instance of IOLoopKernelManager. (Of course, when using JKG, this instance was KernelGatewayIOLoopKernelManager since it derives from the former.) The leak is caused by the circular references established in the `self._restarter` and `self.session.parent` members. This change breaks the circular reference when the restarter is stopped and during `cleanup()` of the kernel manager. Once the references are broken, the kernel manager instance can be garbage collected.
- Loading branch information