ALLInterview.com :: Home Page KalAajKal.com
 Advertise your Business Here     
Browse  |   Placement Papers  |   Company  |   Code Snippets  |   Certifications  |   Visa Questions
Post Question  |   Post Answer  |   My Panel  |   Search  |   Articles  |   Topics  |   ERRORS new
   Refer this Site  Refer This Site to Your Friends  Site Map  Bookmark this Site  Set it as your HomePage  Contact Us     Login  |  Sign Up                      
tip   To Refer this Site to Your Friends   Click Here
Google
 
Categories  >>  Software  >>  Microsoft Related  >>  Dot Net  >>  Dot Net Framework
 
 


 

 
 Dot Net Framework interview questions  Dot Net Framework Interview Questions
 Dot Net Remoting interview questions  Dot Net Remoting Interview Questions
 Dot Net WindowsForms interview questions  Dot Net WindowsForms Interview Questions
 Dot Net General interview questions  Dot Net General Interview Questions
 Dot Net AllOther interview questions  Dot Net AllOther Interview Questions
Question
How Garbage Collector identifies the objects which are not
in use?
 Question Submitted By :: Swapna
I also faced this Question!!     Rank Answer Posted By  
 
  Re: How Garbage Collector identifies the objects which are not in use?
Answer
# 1
In the Dotnet CLR maintains the Heap. It stores the Objects 
which are recently used in the Top of the Heap. By using 
this GC identifies the objects which are recently used and 
which are not in use.
 
Is This Answer Correct ?    5 Yes 2 No
Sri
 
  Re: How Garbage Collector identifies the objects which are not in use?
Answer
# 2
Garbage Collector identifies a unused object using "referce 
counting" 
reference countiing: how many times the object is used 
if the count is zero..its is unuesd....now the gc will 
release the resources..
 
Is This Answer Correct ?    3 Yes 1 No
Kanth
 
 
 
  Re: How Garbage Collector identifies the objects which are not in use?
Answer
# 3
C# makes use of the Finilize() destructor for this purpose. 
The CLR periodically checks the entire program for unused 
objects using the refrence tracing garbage collector which 
in turn invokes he Finilze() destructor to relese the 
memory of such objects.
 
Is This Answer Correct ?    1 Yes 1 No
Anirudh Menon
 
  Re: How Garbage Collector identifies the objects which are not in use?
Answer
# 4
GC identifies the objects which are not in use by the use 
of generations. Whenever a new object is created or deleted 
GC sweeps the heap by moving the variables to different 
generations, and finally destructs the objects whichever 
belongs to generation 0.
 
Is This Answer Correct ?    2 Yes 0 No
Bharani
 
  Re: How Garbage Collector identifies the objects which are not in use?
Answer
# 5
Garbage Collector determines which objects are no longer 
being used by examining the application's roots. In Dot Net 
each and every application has a set of roots. Each root 
either refers to an object on the managed heap or is set to 
null. An application's roots include global and static 
object pointers, local variables and reference object 
parameters on a thread's stack, and CPU registers. The 
garbage collector has access to the list of active roots 
that the just-in-time (JIT) compiler and the runtime 
maintain. Using this list, it examines an application's 
roots, and in the process creates a graph that contains all 
the objects that are reachable from the roots. Objects that 
are not in the graph are unreachable from the application's 
roots. The garbage collector considers unreachable objects 
as garbage and not in use.
 
Is This Answer Correct ?    2 Yes 0 No
Rahul Veer
 

 
 
 
Other Dot Net Framework Interview Questions
 
  Question Asked @ Answers
 
what is the diff b/w asp.net 2.0 & 3.5  2
What is serialization ? MMTS4
What is the necessity for singning an assembly with a strong name? L&T1
VIEWS WITH SYNTAX AND EXAMPLE IN SQL  1
What is CLR? How it will work?  1
I have interview in accenture.I cleared 1st round in techniqual.I have interview with project lead.pls help me. Accenture2
What is Global Assembly Cache (GAC) and what is the purpose of it?  2
How do you sort a dataset?  2
If you are using components in your application, how can you handle exceptions raised in a component ? Accenture3
What is JIT and how is works ?  4
what is VSS? Where we are using? TCS2
Which is the best institute in hyderabad to learn DotNet? Infosys74
What is shared and private assembly ? Accenture2
About Assembly in .NET, types of assemblies, their difference, How to register into GAC. How to generate the strong names & its use ? MMTS2
What is reflection? Merrill-Lynch3
what are generics? Without generics what are the disadvantages in 1.1? HP2
What is the difference between managed and unmanaged code? IBM5
Can you handle all button click events at once in a form? Give coding. Kanbay1
IS MS.Net platform independent or dependent? Ksb10
Diffence between .net framework 1.0 and 2.0? DataPoint2
 
For more Dot Net Framework Interview Questions Click Here 
 
 
 
 
 
   
Copyright Policy  |  Terms of Service  |  Help  |  Site Map 1  |  Articles  |  Site Map  |   Site Map  |  Contact Us interview questions urls   External Links 
   
Copyright © 2007  ALLInterview.com.  All Rights Reserved.

ALLInterview.com   ::  Forum9.com   ::  KalAajKal.com