Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between managed and unmanaged DLL

I am a newbie....I would really like to know detailed difference between two, and when to use these?

like image 928
nightWatcher Avatar asked Feb 09 '11 11:02

nightWatcher


2 Answers

The term "managed code" usually refers to code written in a managed language, such as Java or C#. The term "unmanaged code" usually refers to code written in an unmanaged language, such as C or C++. If you're coming from the .NET world, "managed" probably means C# or VB.NET, and "unmanaged" probably means C or C++.

like image 108
Sasha Goldshtein Avatar answered Sep 22 '22 13:09

Sasha Goldshtein


Managed dll runs inside Common Language Runtime (CLR). Hence it gets several benefits like automatic memory management. Unmanaged dll won't give you all these benefits.

For reaping the full benefits of .Net, create and use managed code.

like image 35
sachin Avatar answered Sep 22 '22 13:09

sachin