Friday 6 July 2012

How does the generational garbage collector in the .NET CLR manage object lifetime? What is non-deterministic finalization?

Purpose:
  • Even though .Net is a managed framework it does not abscond developers from having to understand how memory management works under the hood. Being able to explain the functioning of the garbage collector shows an in depth understanding of the framework under the covers.

Potential Answer:
Divided into three stages. One short lived and other two long term. It assumes new objects will have shorter lifespans that older objects. Non-deterministic finalization means that the finalizer will not immediate be invoked once the object goes out of scope since it is more effecient to reclaim the heap in sections that doing it on a per case basis.

2 comments:

  1. This comment has been removed by the author.

    ReplyDelete
  2. This comment has been removed by a blog administrator.

    ReplyDelete