Difference between native and managed code?

后端 未结 4 1273
情话喂你
情话喂你 2020-12-07 09:12

For example, when looking at the GlowCode profiler website it says:

\"GlowCode 6.2 and x64 profile native, managed, and mixed C++, C#, .NET code\"

What do th

4条回答
  •  既然无缘
    2020-12-07 10:00

    Native code is written in the "native" machine language of the computer that it is running on and is executed directly by the processor.

    Managed code is written in a special language that requires another program to run (i.e. manage) it. This other program is often called an interpreter as it interprets the special language.

    C and C++ programs are native.

    Java and C# (and all .NET languages for that matter) are managed.

    Managed C++ is a special form of C++ that runs in the .NET interpreter.

    A mixed program is a program that uses code that is both native and managed.

提交回复
热议问题