Logo 
Search:

.net framework Interview FAQs

Submit Interview FAQ
Home » Interview FAQs » .net frameworkRSS Feeds
.Net Framework
Comments: 0

What is garbage collection?

Garbage collection is a heap-management strategy where a run-time component takes responsibility for managing the lifetime of the memory used by objects. This concept is not new to .NET - Java and many other languages/runtimes have used garbage colle...
Posted By:Earl Stone      Posted On: Nov 26

.Net Framework
Comments: 0

Is it true that objects don't always get destroyed immediately when the last reference goes aw

Yes. The garbage collector offers no guarantees about the time when an object will be destroyed and its memory reclaimed.

There was an interesting thread on the DOTNET list, started by Chris Sells, about the implications of non-deterministic destr...
Posted By:Anna Hill      Posted On: Sep 25

.Net Framework
Comments: 0

Why doesn't the .NET runtime offer deterministic destruction?

Because of the garbage collection algorithm. The .NET garbage collector works by periodically running through a list of all the objects that are currently being referenced by an application. All the objects that it doesn't find during this search are...
Posted By:Alexander Fields      Posted On: Feb 07

.Net Framework
Comments: 0

Is the lack of deterministic destruction in .NET a problem?

It's certainly an issue that affects component design. If you have objects that maintain expensive or scarce resources (e.g. database locks), you need to provide some way to tell the object to release the resource when it is done. Microsoft recommend...
Posted By:Vivian Ruiz      Posted On: Feb 18

.Net Framework
Comments: 0

Should I implement Finalize on my class? Should I implement IDisposable?

This issue is a little more complex than it first appears. There are really two categories of class that require deterministic destruction - the first category manipulate unmanaged types directly, whereas the second category manipulate managed types ...
Posted By:Harold Graham      Posted On: Nov 30

.Net Framework
Comments: 0

Do I have any control over the garbage collection algorithm?

A little. For example the System.GC class exposes a Collect method, which forces the garbage collector to collect all unreferenced objects immediately.

Also there is a gcConcurrent setting that can be specified via the application configuration fi...
Posted By:Giovanna Silva      Posted On: Mar 24

  1  2  3  4  5  6  7  8  9  10