Reset to default
Trending sort is based off of the default sorting method — by highest score — but it boosts votes that have happened recently, helping to surface more up-to-date answers.
It falls back to sorting by highest score if no posts are trending.
Native code is the code whose memory is not “managed”, as in, memory isn’t freed for you (C++’ delete and C’s free, for instance), no reference counting, no garbage collection. Managed code, you guessed it, is the code whose memory is free and allocated for you, garbage collection and other goodies.
Mixed code is when you have managed code that calls onto an unmanaged layer. Normally, when you have a pure unmanaged C++ DLL and you call it from .NET using P/invoke.
Native code is compiled to work directly with the OS. Managed code however, is precompiled (bytecode in Java-speak) but is then processed by the Just In Time Compiler to native code at runtime. Managed code has the interesting side effect of having the potential of running on different operating systems, because the machine code is not created until the VM actually uses it. This way, you are able to run .NET apps on Windows and also run them on Linux or Mac that have the Mono runtime installed. The portability is not as clean currently as Java is (because of Microsoft’s naturally closed architecture), but the concept remains.
If you are running an unmanaged app, the code has been compiled to run for the designated OS/Hardware. Any portability to another OS/instruction set is lost and must be recompiled to execute.
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.
Code that runs under the control of the common language runtime (CLR) is known as managed code. Code that does not run under the CLR is known as native code.