I am running a program that uses the Report Designer. It takes multiple datasets (User defined at runtime) of varying sizes (Again based on the user at runtime) and runs. This works correctly however when the design phase is over and closed, the system doesn't release the resources. In my tests I've managed to create exceptionally large datasets but after the report is disposed and the dictionary of datasets referenced has been cleared, it still doesn't give up the resources. Worse, if I run the same reports and then the designer again, instead of replacing the old memory, it uses new memory which means just running the same designer with the same created datasets again will take up that much memory AGAIN and not release it.
I've searched the forums and I found this:
http://forum.stimulsoft.com/Default.asp ... ts&m=13167
I do recognize that there is a set limit by windows to how big these Datasets can be while being accessed by the Report Designer and that's fine- that's not my problem. My problem is that after calling this function, even if the user goes to do things completely unrelated these resources are stilll used, or worse if the suer needs to run that particular function again the data won't be reset and lost resources will acrue.
I have placed several GC.Collect() and GC.Colllect(MaxGeneration) throughout the code. If I comment out JUST the actual report.design() call, then the program releases the resources on the first Garbage Collect. If I run the Report.Design call, however, it never reallocates the memory- not even after 10 minutes or when I close the form on which the code is called. It won't release these memory resources until either the program itself is closed or the program crashes due to a systemoutofmemory exception.
I have tried Report.Dispose, Report = Nothing, Report.ClearAllStates, Report.Reset(), Report.Stop = true, StiReport.ClearImageCache(), StiReport.ClearReportCache(), GC.Collect() Three times in a row, GC.Collect(MaxGeneration) and nothing will alleviate those resources (In my testing I've managed to get the used data up to nearly a GB which goes away if I don't use the report.design function- It stays used up forever when calling report.design()-even if I just close the design window immediately).
Please tell me what I can do to solve this? I am running the latest version of stimulsoft as of 2 weeks ago if that helps.
Report.Design never releases resources
-
- Posts: 16
- Joined: Mon Oct 11, 2010 9:43 am
Report.Design never releases resources
Hello,
When closing, the designer releases all the resources that were created with it. But the designer has no right to release the data that you register in the report dictionary. The data you need to free in your application.
Following these rules should avoid memory leaks.
If this advice did not help you, please send us a simple test project, which reproduces the issue.
Thank you.
When closing, the designer releases all the resources that were created with it. But the designer has no right to release the data that you register in the report dictionary. The data you need to free in your application.
Following these rules should avoid memory leaks.
If this advice did not help you, please send us a simple test project, which reproduces the issue.
Thank you.
-
- Posts: 16
- Joined: Mon Oct 11, 2010 9:43 am
Report.Design never releases resources
I have sent the sample project. It very simply illustrates how running the Report.Design exhausts resources and never returns them long after the dictionary is cleared and any reference to it or the report no longer exist.
Please let me know how I can resolve this issue as quickly as possible. Thank you
Please let me know how I can resolve this issue as quickly as possible. Thank you