Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

Can anyone explain the difference between unmanaged code and managed code?

share|improve this question
add comment

1 Answer 1

up vote 7 down vote accepted

This is not a SharePoint question, but anyways, here's a real quick intro:

Unmanaged code: This is code that is compiled directly to machine code using native languages (C++, VB etc). The reason it is called unmanaged code is that your application is responsible for resource management (memory, handles etc). This is typically what we call a Win32 application.

Managed code: Managed code are code compiled to an intermediate byte code, which (normally) during runtime are JIT (Just In Time) compiled into machine code. The reason it is called managed code is that it has built-in functionality for memory management and garbage collection. This is what the Microsoft .NET Framework is (or Java for that matter).

share|improve this answer
    
Thanks. I can now relate this with sand box solution (which does not allow to run unmanaged code.) –  Regmi Sep 23 '11 at 5:56
    
+1 for being meta expressive :D –  Falak Mahmood Sep 23 '11 at 10:10
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.