registerDisposeCallback and registerDisposable