Home » .Net

What are the roles of CLR (Common Language Runtime) in .NET Framework?

Learn: What are the roles of Common Language Runtime (CLR) in .Net framework? Explain the roles in details.

CLR (Common Language Runtime) is basic component of .NET Framework. It provides an environment to run .NET applications on targeted machine. CLR provides environment for all .NET languages compilers for converting source code into a common language known as IL or MSIL or CIL.

CLR provides multiple services to execute processes, like memory management service and security services. CLR performs multiple tasks to manage the execution of .NET applications. Following responsibilities of CLR are given below:

  1. Automatic memory management
  2. Code access security
  3. Garbage collection
  4. JIT compilation

1) Automatic memory management

CLR calls various predefined functions of .NET framework to allocate and de-allocate memory of .NET objects. So that, developers need not to write code to explicitly allocate and de-allocate memory.

2) Code access security

CLR allows access to code to perform only those tasks for that it has permission. It also checks user’s permissions using authentication and configuration files of .NET applications.

3) Garbage collection

GC is used to prevent memory leaks or holes. Garbage collector of CLR automatically determines the best time to free the memory, which is allocated to an object for execution.

4) JIT compilation

JIT stands for Just In Time. It is also an important part of Common Language Runtime (CLR), JIT compiler converts MSIL code to targeted machine code for execution.



Comments and Discussions!




Languages: » C » C++ » C++ STL » Java » Data Structure » C#.Net » Android » Kotlin » SQL
Web Technologies: » PHP » Python » JavaScript » CSS » Ajax » Node.js » Web programming/HTML
Solved programs: » C » C++ » DS » Java » C#
Aptitude que. & ans.: » C » C++ » Java » DBMS
Interview que. & ans.: » C » Embedded C » Java » SEO » HR
CS Subjects: » CS Basics » O.S. » Networks » DBMS » Embedded Systems » Cloud Computing
» Machine learning » CS Organizations » Linux » DOS
More: » Articles » Puzzles » News/Updates

© https://www.includehelp.com some rights reserved.