Differences between managed and unmanaged code in .Net

In this post, we will get familiar with the contrasts among oversaw and un-oversaw code in .Net and how we can distinguish which whether a code is overseen or un-overseen?

There are following point that clears the distinction among oversaw and un-oversaw code:

  1. Overseen code is the code which is executed by Common Language Runtime as opposed to working framework. While Un-oversaw code is the code which is executed straightforwardly by the working framework outside the Common Language Runtime condition.
  2. The oversaw code compiler initially orders the oversee code to MSIL code, otherwise called CIL code. This MSIL code doesn’t rely upon any machine design and we can execute it on various machines. The un-oversaw code is legitimately ordered to local or machine code which relies upon the machine arrangement.
  3. In oversaw code, execution of the code dealt with by CLR, CLR gives various administrations like trash assortment, special case taking care of, security backing and type checking. While if there should arise an occurrence of un-oversaw code assignment and de-portion of memory and type wellbeing to be dealt with by the product engineer.
  4. In the event that the un-oversaw code isn’t appropriately dealt with, it might bring about memory gaps or memory spills.
  5. Instances of un-oversaw code are Win32 APIs and ActiveX parts that are execute past the extent of basic language runtime.

Leave a Comment

error: Alert: Content is protected!!