Hey,
I have a MDIParentWindow ,and I open a MDIChildWindow from it.This
MDIChildWindow is using CrystalReportViewers to show some Crystal report
documents.But I noticed after I closed this MDIChildWindow ,the system
resources used by this MDIChildWindow were not released.If I open and
close this MDIChildWindow again and again,it happenned everytime.Would
you please tell me what's the problem
Appreciate for any help.
In MDIParentWindow I wrote the following code:
AdvancedReport TodayReport = new AdvancedReport(DateTime.Today,
DateTime.Today);
if (TodayReport.CanBeShown)
{
TodayReport.MdiParent = this;
TodayReport.Text = "Today's Report";
TodayReport.Show();
}
else
{
TodayReport.Dispose();
}

Why my form cannot release resources(such as memory)?
Judge Of Nights
Nirvana
mewdied,
Thanks a lot.
I tried to add the following code at the FormClosing Event handle:
private void AdvancedReport_FormClosing(object sender, FormClosingEventArgs e)
{
//AdReportAllDataTable is Crystal report document
AdReportAllDataTable1.Close();
}
and I also added the following code at the FormClosed Event handle:
private void AdvancedReport_FormClosed(object sender, FormClosedEventArgs e)
{
AdReportAllDataTable1.Dispose();
AdReportAllDataTable1 = null;
//crpvAllDataTable is a Crystal report viewer
crpvAllDataTable.Dispose();
}
Well,It works a little bit,but cannot solve all the problem.
shy_man
Kikala
I'm having the same problem too. My form uses about 80M memory at the first time and doesn't free memory. Anybody have solved this.
RatOmeter
Monarghel