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 / New Users / March 2006

Tip: Looking for answers? Try searching our database.

Will Dot net framework 2.0 auto free the unuse object?

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
briancfk@gmail.com - 15 Mar 2006 09:47 GMT
Recently, my company using asp.net 2.0 to develop a web site

When I check the asp.net code, i found that there is many pages that
code as the way as below
e.g.

For i=0 to i=50
   Dim obj as new myObject()
.......................
Next

The obj object that created didt free it or other word didt set to
nothing

This web site / web pages, every day or same time will have many user
browse it

What i worry is, all this obj that didt use will taking space in the
memory,  and slow down the system. and even worst, cause the system
hang

Will This HAPPEN?

And What I expect is, the Dot Net Framework will detect the memory
usage and only will free the unuse object when the memory usage is over
the specific limit.
Then it will automatic free the unuse object, Am I true?

Cause last time experience is, that is with Dot Net Frame work 1.1, it
will not free the object so efficiently. So, when i coding, I have to
very carefull to avoid the unuse object taking space in my memory and
slow down my system.
Mattias Sjögren - 15 Mar 2006 17:37 GMT
>Will This HAPPEN?

No, if the objects are not referenced the GC will eventually clean
them up.

Mattias

Signature

Mattias Sjögren [C# MVP]  mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.


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.