Find jobs | Jobseekers
Employer login
About us Sitemap of www.CareerRide.com Sitemap FAQ related with www.CareerRide.com FAQ Click here to Contact us Contact
       
Submit Resume Free ! | Access Resume Free !
Home Career Services Resume Services Interview questions Articles Books
Content
NET framework
NET assembly
NET code security
NET access modifiers
NET architecture
NET base class library
NET CLR
NET constants,enum,arrays
NET data types
NET menu
NET garbage collection
NET debug and trace
NET properties
NET form
NET assemblies & resources
NET class & structures
NET binding,viewing,filtering
NET configuring & optimizing
NET configuring setup project
NET constructors & destructors
NET control
NET dataset objects
NET debugging tools
NET debug & trace classes
NET delegates & events
NET exception handling
NET globalization-localization
NET interoperability
NET project deployment
NET securing application
NET using XML
NET validating user input
NET windows communication
NET windows presentation
NET windows workflow
 
ASP.NET
C#.NET
VB.NET
AJAX
 
PHP
 
C
C++
Java
Data Structure
Oops
 
Database concepts
SQL Server
Oracle
MySQL
Data warehousing
Service-oriented architecture
SQL Server notification services
SQL Server Reporting Services
Sharepoint
Biztalk interview questions
 
Operating System
Project Management
Linux
Testing
Networking
Software engineering
 
UML
XML
HTML
SOAP
CSS
VBScript
 
CV tips
Cover letter tips
Interview tips
Human resources
Soft skills
Group discussion

.NET garbage collection


.NET garbage collection - Interview questions

<<Previous  Next>>

.NET garbage collection - August 25, 2008 at 18:00 PM by Amit Satpute

What is garbage collection?

Answer
The applications created acquire memory. Memory management includes deallocating this acquired resources and acquiring them. This is done by garbage collector and this concept of automatically reclaiming the memory is called Garbage Collection.

Is it possible to force garbage collection to run?     

Answer
Yes, it is possible to force Garbage Colletcion . The way to do it is by using GC.Collect().

However, it is also necessary to run the finalizers of the objects that need to be deallocated. So, it is necessary to use GC.WaitForPendingFinalizers() along with GC.Collect() so that the finalizers threads are not executed separately. 

Define Dispose().

Answer
It is a method for releasing resources that an object acquires. The Dispose method is called by the destructor.


October 30, 2008 at 18:10 pm by Amit Satpute

Explain how garbage collection manages reclamation of unused memory in .NET.

CLR performs garbage collection on small objects and large objects separately. It maintains separate heaps for these two types of objects. Large Objects are maintained in LO

Heap and small objects are kept in multiple heaps which are compacted regularly.

It uses the JIT compiler which provides it the references of live objects indicating that they are alive. The rest of the objects are then subject to garbage collection.

Then the free memory is merged and the occupied memory is compacted so that the live objects are contiguous.

Explain how garbage collection deals with circular references.

Circular referencing issue happens when two objects refer to each other. Usually in a parent-child relationship, situations occur where a child interacts with the parent object and has a reference held to the parent object.

The .NET, the objects that are reachable from the root can be cleaned up easily. Thus, this can even be applied to circular reference and have the objects holding the resources cleaned up.


<<Previous  Next>>


 
Today's Hot Jobs
C++  SQL Server
.NET  Java  Oracle
Finance  Marketing
Seekers  Employers
Copyright © 2008 CareerRide.com. All rights reserved.