Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Performance / October 2004

Tip: Looking for answers? Try searching our database.

Stumped: What Garbage Collector?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Billg_sd - 22 Oct 2004 00:29 GMT
This n-tier .Net 1.1 WinForms app I'm working on starts at about 37 MB on
startup, As I use the app:

view crystal reports, perform queries, load various forms

it grows to over 250MB!  It eventionally becomes so slow & unresponsive (due
to thrashing) that you have to exit the app & restart.  Even when I
deliberately call System.GC.Collect(), I recoup about 1MB RAM.  This is
unacceptable.  

Furthermore,  90% of the used memory  should be reclaimable since:

1) I'm back to the sign-on screen
2) all forms have been closed
3) all ADO.NET, SqlClient & related objects have gone out of scope.  

Why can't I reclaim memory?  

--Billg_sd
Alvin Bruney [MVP] - 22 Oct 2004 01:07 GMT
are you manipulating very large datasets?
what are you doing that is taking so much memory?

Signature

Regards,
Alvin Bruney
[ASP.NET MVP http://mvp.support.microsoft.com/default.aspx]
Got tidbits? Get it here... http://tinyurl.com/27cok

> This n-tier .Net 1.1 WinForms app I'm working on starts at about 37 MB on
> startup, As I use the app:
[quoted text clipped - 16 lines]
>
> --Billg_sd
Billg_sd - 22 Oct 2004 04:21 GMT
Hi Alvin,  

Thanks for the response.

I'm not pulling large data sets at all, from 1 to 500 records using
sqlClient Command objects to call Stored Procedures.  However, each of the
forms that display the datasets has graphics, Crystal reports, and 3rd party
.Net controls.  So it's understandable that it's gonna use a chunk of memory.
It's just that when I exit all such forms (and the forms are no longer
accessable), one would think memory should be returned...especially when I
explicitly call GC.Collect

--Billg_sd

> are you manipulating very large datasets?
> what are you doing that is taking so much memory?
[quoted text clipped - 19 lines]
> >
> > --Billg_sd
Sriram Krishnan - 22 Oct 2004 05:28 GMT
Hmm..use CLR Profiler to see where your RAM is being used. And I really
don't think it is advisable to call GC.Collect as it messes with the
heuristics of the GC

Signature

Sriram Krishnan

http://www.dotnetjunkies.com/weblog/sriram

> Hi Alvin,
>
[quoted text clipped - 36 lines]
>> >
>> > --Billg_sd
Billg_sd - 22 Oct 2004 17:25 GMT
I may go ahead and use the profiler.  

Again, most of the allocations are done in MDI child forms, so when you call
form.close(), one would think the garbage collector would collect it,
especially when the parent's form.Close() is called later on.  

> Hmm..use CLR Profiler to see where your RAM is being used. And I really
> don't think it is advisable to call GC.Collect as it messes with the
[quoted text clipped - 40 lines]
> >> >
> >> > --Billg_sd
Stuart Carnie - 22 Oct 2004 17:41 GMT
I have also seen where events need to be released on some form controls, or
otherwise there are still root references, and memory will not be freed up.

You may want to do some searching on this, but AQTime 4.x has some
documentation on this.

Cheers,

Stu

> I may go ahead and use the profiler.
>
[quoted text clipped - 46 lines]
> > >> >
> > >> > --Billg_sd
The great MaGeOs - 29 Oct 2004 23:27 GMT
Dispose()!!!!!!

CrystalReports and Database Objects are in most instances use non-managed
resources.  Always make sure that you call dispose() on objects before they
go out of scope.  We have had similar problems, with bitmap objects that was
solved by calling dispose.

> This n-tier .Net 1.1 WinForms app I'm working on starts at about 37 MB on
> startup, As I use the app:
[quoted text clipped - 15 lines]
>
> --Billg_sd

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.