Tutorial: The Importance of Using 100% Managed Code
This tutorial reviews the benefits and advantages of using managed code in .NET applications. Managed code runs in the Common Language Runtime (CLR), which provides services such as automatic memory management, platform-neutrality, and cross-language integration.
In contrast, unmanaged code does not run inside the .NET environment and cannot use any .NET managed facilities. Unmanaged code includes all code written before the .NET Framework was introduced.
Key features available to managed code applications include:
- Performance benefits gained from executing all code in the CLR. Calling unmanaged code decreases performance because additional security checks are required. Other performance advantages are available through judicious use of the Just-In-Time compiler and NGEN utility.
- Automatic lifetime control of objects, which includes garbage collection and scalability features.
- Ease of deployment and the vastly improved versioning facilities-the end of "DLL hell".
- Built-in security by using code access security and avoiding buffer overruns.
NOTE: This document refers to functionality in the Microsoft .NET Framework 2.0. If you are using an earlier version of the .NET Framework or the DataDirect Connect® for .NET 2.2 data providers, refer to "The Importance of Managed Code in .NET Applications".
Click on the links below to navigate to comprehensive descriptions accompanying the selected term:
- Advantages of Managed Code
- Just-in-Time Compiler
- NGEN utility
- Maintaining a 100% managed code environment
- Automatic memory management
- Automatic lifetime control of objects
- Garbage collection
- Scalability features (Thread Pooling)
- Checks by the .NET runtime
- Cross-language integration
- Ease of deployment
- Code access security
- Avoiding buffer overruns
- Footnotes and references