public void Dispose() { PopupBase.SourceModule = null; this.Tag = null; // Designer StiOptions.WCFService.WCFRenderReport -= WCFRenderReport; StiOptions.WCFService.WCFTestConnection -= WCFTestConnection; StiOptions.WCFService.WCFBuildObjects -= WCFBuildObjects; //StiOptions.WCFService.WCFRetrieveColumns -= WCFRetrieveColumns; StiOptions.WCFService.WCFOpeningReportInDesigner -= WCFOpeningReportInDesigner; StiOptions.WCFService.WCFRequestFromUserRenderReport -= WCFRequestFromUserRenderReport; StiOptions.Engine.GlobalEvents.SavingReportInDesigner -= GlobalEvents_SavingReportInDesigner; // Interactions StiOptions.WCFService.WCFRenderingInteractions -= WCFRenderingInteractions; // Prepare RequestFromUser Variables StiOptions.WCFService.WCFPrepareRequestFromUserVariables -= WCFPrepareRequestFromUserVariables; StiOptions.WCFService.WCFInteractiveDataBandSelection -= WCFInteractiveDataBandSelection; //if (reportDomain != null) //{ // AppDomain.Unload(reportDomain); // reportDomain = null; //} StiReport.ClearImageCache(); StiReport.ClearReportCache(); //designer.DesignerPreviewControl.TargetUpdated = null; //designer.DesignerPreviewControl = null; //designer.Report.ClearAllStates(); //designer.PageView.Dispose(); //var report = designer.Report; //if (report != null) //{ // report.Dictionary.DataStore.Clear(); // if (report.CompiledReport != null) report.CompiledReport.DataStore.Clear(); // report.Dispose(); //} //designer.Report = null; //designer.DictionaryPanelService.Dispose(); //designer.CurrentTool.Dispose(); //LayoutGrid.Content = null; DesignerControl.Proryv_Dispose(null); GC.Collect(); GC.WaitForPendingFinalizers(); GC.Collect(); }