What is an un/managed DLL? What is un/managed code

2019-04-20 18:59发布

This question already has an answer here:

Could someone please explain to me what an un/managed DLL is? And what is un/managed code?

4条回答
三岁会撩人
2楼-- · 2019-04-20 19:50

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.

查看更多
爷、活的狠高调
3楼-- · 2019-04-20 19:59

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

查看更多
姐就是有狂的资本
4楼-- · 2019-04-20 20:00

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

查看更多
该账号已被封号
5楼-- · 2019-04-20 20:00

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.

查看更多
登录 后发表回答