public void Dispose() { if (app is IsolatedApplication) { IsolatedApplication iapp = app as IsolatedApplication; iapp.BackendChanging -= OnBackendChanging; iapp.BackendChanged -= OnBackendChanged; } if (tmpProjectFile != null && File.Exists(tmpProjectFile)) { File.Delete(tmpProjectFile); tmpProjectFile = null; } if (backend != null) { backend.Dispose(); } if (Disposed != null) { Disposed(this, EventArgs.Empty); } System.Runtime.Remoting.RemotingServices.Disconnect(this); }