开发者

managed and unmanaged

开发者 https://www.devze.com 2023-02-22 18:04 出处:网络
if a .net dll cont开发者_C百科ains both managed and unmanaged code , how does the code will be converted to CIL and how CLR allocate and manages the memoryThe unmanaged code is by definition not manag

if a .net dll cont开发者_C百科ains both managed and unmanaged code , how does the code will be converted to CIL and how CLR allocate and manages the memory


The unmanaged code is by definition not managed by the CLR. It will not be converted to CIL, and the CLR will neither allocate nor manage memory for it. That only happens for the managed code.

When you write unmanaged code in a .NET assembly, you're instructing the compiler and the run-time that you want to take matters into your own hands. You become responsible for memory management, just as if you were writing native code.

0

精彩评论

暂无评论...
验证码 换一张
取 消