public void Dispose() { if (SurfaceAllocator != null) { ((IVMR9PresenterRegisterCallback)SurfaceAllocator).RegisterCallback(null); } SurfaceAllocator = null; }