private void UITeardown() { mTaskpaneHost = null; mTaskpaneView.DeleteView(); Marshal.ReleaseComObject(mTaskpaneView); mTaskpaneView = null; }