can we call the garbage collector to run explicicitly?

Answer Posted / prateek

But forcefully calling Garbage collector reduces the
performance. As when CLR runs Garbage collector
automatically it checks all the objects which are not used
for a long time and remove them. But if we use
System.GC.Collect(), it will shift the particular object to
cache. When CLR founds no object which is made to be free
then it will check the cache memory from there it will
remove that very object. So, how it is reducing the performance.

Is This Answer Correct ?    3 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the levels at which filters can be applied in an asp.net mvc application?

588


Can you explain the page life cycle of mvc?

555


Do you know about the new features in asp.net mvc 4 (asp.net mvc4)?

576


Is .net framework dead?

535


What is the version number for the next version of the .net framework, codenamed �orcas�?

483






What is net framework 3.0 ?

594


Can we free memory explicitly without waiting for garbage collector to free the memory in .net compact framework?

538


What is an asynchronous controller in asp.net mvc?

545


What are scaffold templates in mvc?

580


What is definingquery in entity framework? : Entity framework

552


When using razor views, do you have to take any special steps to protect your asp.net mvc application from cross site scripting (xss) attacks?

703


What is web api‘s in asp.net mvc 4 ?

584


What is the difference between model and entity?

493


what is linq to entities?

631


What is the use of razor view engine?

527