What Common Language Runtime(CLR)?
The clr is used to provide run time execution environment. Code running under the CLR is known as managed code.
Before execution of CLR, Any source code need to be compiled.
Compilation occurs in two stapes in .Net-
1. Compilation of source code to IL.
2. Compilation IL to platform-specific code by the CLR.
Responsibility of CLR-
1. Garbage collection-
CLR automatically manages memory. When objects are not referred GC automatically releases those memory.
2. Code Access security-
CAS grants rights to program depending on the security configuration of the machine.
3. Code verification -
This ensures proper code execution and type safety while the code runs.
4. IL to natives translators-
CLR uses JIT and compiles the IL code to machine code and then executes.
No comments :
Post a Comment
Ask a Question?