ONJava.com -- The Independent Source for Enterprise Java
oreilly.comSafari Books Online.Conferences.

advertisement

AddThis Social Bookmark Button
Article:
  WinFX: An All-Managed API
Subject:   Great, but what is "managed" ?
Date:   2003-12-13 00:26:29
From:   anonymous2
Response to: Great, but what is "managed" ?

Managed code is like code that is being watched over by something else.


For example, in .Net you can create a Bitmap object to manage a Bitmap picture then when you're finished with the Bitmap you can just ignore the object and the Garbage Collector will remove it when it goes out of Scope whereas in Win32 you have a HBITMAP handle that has to be manually controlled and cleaned up with DeleteObject API in GDI32 but if you don't delete it you get a memory leak when the program closes.


In .Net Managed code basically makes everything safer, simpler and also increases security by seeing what the code is going to do before it does it.