What is an un/managed DLL? What is un/managed code? [duplicate]

我的未来我决定 提交于 2019-12-05 02:35:08
Sachin Shanbhag

You will get a fair idea on managed and unmanaged code in following article -

http://www.developer.com/net/cplus/article.php/2197621/Managed-Unmanaged-Native-What-Kind-of-Code-Is-This.htm

Unmanged code will be compiled to machine language to run directly on the hardware.

Managed code will be compiled to a virtual machine called CLR (Common Language Runtime), and compiled to machine language on start by the JIT (Just in time compiler). THE CLR can be compared to the java virtual machine, it is the same concept.

Short answer: Code compiled without .NET framework (plain old DLL).

When you code with .net you get some memory management, garbage collection etc, so it is called managed code. Older versions are unmanaged (for the memory is managed by the programmer)

And to keep things easy, calling from managed code to unmanaged code can be a trye pain.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!