managed code vs. non-managed code 
Author Message
 managed code vs. non-managed code

In CLR article from MSDN, it says "code that you develop with a language
compiler that targets the runtime is called managed code." I am not sure
what it means. My understanding is managed code means the .NET system will
have auto. garbage collection supports, but unmanaged code won't have this
supports. Please advice. Thanks!!

John



Thu, 13 Oct 2005 00:28:10 GMT  
 managed code vs. non-managed code

Quote:

> In CLR article from MSDN, it says "code that you develop with a
> language compiler that targets the runtime is called managed code." I
> am not sure what it means. My understanding is managed code means the
> .NET system will have auto. garbage collection supports, but
> unmanaged code won't have this supports. Please advice. Thanks!!

You and the article are both correct.

Managed code targets the runtime.  The runtime implements automatic garbage
collection.

Unmanaged code targets the native CPU (x86) and doesn't have garbage
collection (unless you specifically write, buy, licence or find garbage
collection code that you use in your program).

-cd



Thu, 13 Oct 2005 01:16:32 GMT  
 managed code vs. non-managed code
Thanks!

What do u mean "targets the runtime" and "targets the native CPU" ??

"targets the runtime" means the target code is regardless of the machine
type??

"targets the native CPU" means the target code depends on the machine type?



Quote:

> > In CLR article from MSDN, it says "code that you develop with a
> > language compiler that targets the runtime is called managed code." I
> > am not sure what it means. My understanding is managed code means the
> > .NET system will have auto. garbage collection supports, but
> > unmanaged code won't have this supports. Please advice. Thanks!!

> You and the article are both correct.

> Managed code targets the runtime.  The runtime implements automatic
garbage
> collection.

> Unmanaged code targets the native CPU (x86) and doesn't have garbage
> collection (unless you specifically write, buy, licence or find garbage
> collection code that you use in your program).

> -cd



Thu, 13 Oct 2005 08:20:05 GMT  
 managed code vs. non-managed code

Quote:

> Thanks!

> What do u mean "targets the runtime" and "targets the native CPU" ??

> "targets the runtime" means the target code is regardless of the machine
> type??

"Targets the runtime" means that the resulting code is not actual CPU
instructions, but some kind of byte-code that gets interpreted by the CLR
at run-time.

This is the same idea as with Java Virtual Machine. Theoretically, if CLR
is implemented on many platforms, the same managed could run on all
of those, just like the same Java applet can run on different machines.

Quote:
> "targets the native CPU" means the target code depends on the machine type?

Yes.

Ivan



Thu, 13 Oct 2005 08:39:45 GMT  
 
 [ 4 post ] 

 Relevant Pages 

1. moving arrays from un-managed to managed code.

2. Passing managed objects through non-managed exported functions

3. VS.Net deployment for COM+ component in combination with managed code

4. Referencing data from unmanaged code to managed code in C++ Wrapper class

5. Managed code with unmanged code assertion

6. calling managed code from unmanaged code

7. Call managed code from unmanged code

8. Calling managed code from unmanaged Code

9. Debugging into managed c++ DLL that is being used by unmanaged code

10. using a wndProc to processes msgs in managed C++ code, Compact Framework

11. Managed code details

12. Creating a .NET managed library to talk to existing unmanaged code

 

 
Powered by phpBB® Forum Software