Wrox Programmer Forums

Need to download code?

View our list of code downloads.

| FAQ | Members List | Search | Today's Posts | Mark Forums Read
.NET Framework 2.0 For discussion of the Microsoft .NET Framework 2.0.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the .NET Framework 2.0 section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old October 3rd, 2007, 01:38 AM
Registered User
Join Date: Sep 2007
Location: Hyderabad, A.P, India.
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Garbage Collection

what is the time duration in which garbage collection is calling by CLR.

Azizur Rehman
Reply With Quote
  #2 (permalink)  
Old February 3rd, 2008, 11:16 AM
Registered User
Join Date: Feb 2008
Location: Huntsville, Alabama, .
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts

First off, there's no set timer that goes off to initialize the garbage collector.

Garbage collection happens when the user's system starts running low on resources or during periods of inactivity. You should, from a programmer's stand-point, consider it to go off randomly.

You can [u]request</u> the garbage collector to run, but almost everyone I know, and every author I've ever read, suggest against doing this manually.

If you need a resource released, or and action to occur upon garbage collection, it's best to have your class implement IDisposable and then use a using block for the variable.

Reply With Quote

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
garbage collection generalization tapan General .NET 2 April 27th, 2007 07:13 AM
Garbage collection in VC++ chandugsekhar BOOK: Beginning Visual C++ 6 0 October 18th, 2006 12:09 PM
Garbage Collection Survey S.Marion General .NET 1 June 7th, 2005 12:46 PM
Garbage Collection... kk_katepally General .NET 1 December 21st, 2004 04:18 AM

All times are GMT -4. The time now is 08:50 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.