1.

What is meant by Managed and Unmanaged code?

Answer»

The code being managed by the CLR is CALLED Managed code. This code basically runs within the CLR. Thus, it is important to get the .Net framework installed in order to execute the managed code. CLR manages its memory through garbage collection and even uses the other FEATURES of .Net like CAS and CTS for proper and perfect management of the code.

Following steps are followed while executing a Managed code:

  • Step I: It involves choosing a language compiler which entirely depends on the language in which the code is written.
  • Step II: Converting the above-achieved code into an Intermediate Language with the help of its own compiler.
  • Step III: The Intermediate Language is then targeted to CLR followed by conversion into native code with the help of JIT compiler.
  • Step IV: The final step involves the execution of the Native code.

On the other hand, Unmanaged code is any code that does not at all depend on CLR for execution which means it is developed by any other language other than .Net framework.

It even uses its own runtime environment for compiling and execution of the data. 

Though it is not being run inside the CLR, but the unmanaged code works PROPERLY if all the other parameters are correctly mentioned here.



Discussion

No Comment Found