Support hooking dealloc. Closes #3.