How does Garbage collector(GC) works in .net
Answer Posted / pradip kumar
Basically GC.Collect will work only if the memeory space is
less then required space.
You can force it to run by System.GC.Collect();
How it works :
Through 'Genaration Number' . CLR assigned this number for
each object so that GC can identify which one to be removed.
It can be 0,1,2 based upoon the
old/new/referenced/dereferenced criteria.
To check the space before and after GC.Collect() method use
GC.GetTotalMemory(true) method.
Regards,
Pradip kr Sen
Hyderabad
| Is This Answer Correct ? | 4 Yes | 2 No |
Post New Answer View All Answers
How do I use response redirect?
What is the difference between pathparam and queryparam?
What is webresource axd?
Can you explain how ASP.NET application life cycle and page life cycle events fire?
Can we have a web application running without web.config file?
What is the difference between session.abandon() vs clear()?
How many types of validators are there in asp net?
How do u deploy your asp.net application?
How we can force all the validation controls to run?
What is server redirect?
How to turn off cookies for a page?
Explain the difference between codebehind="mycode.aspx.cs" and src="mycode.aspx.cs"?
Why should i prefer JSP over asp.net or any other web development language..??
Explain the basic functionality of garbage collector?
If you have an application with multiple security levels though secure login and my ASP.NET web appplication is spanned across three web-servers by using round-robbin load balancing. Explain which is the best approach to maintain login-in state for the users?