Jump to content
 







Main menu
   


Navigation  



Main page
Contents
Current events
Random article
About Wikipedia
Contact us
Donate
 




Contribute  



Help
Learn to edit
Community portal
Recent changes
Upload file
 








Search  

































Create account

Log in
 









Create account
 Log in
 




Pages for logged out editors learn more  



Contributions
Talk
 



















Contents

   



(Top)
 


1 Terminology  





2 Uses  





3 References  





4 External links  














Managed code






Español
Français
Magyar
Nederlands

Polski
Русский
Slovenščina
Svenska
Українська

 

Edit links
 









Article
Talk
 

















Read
Edit
View history
 








Tools
   


Actions  



Read
Edit
View history
 




General  



What links here
Related changes
Upload file
Special pages
Permanent link
Page information
Cite this page
Get shortened URL
Download QR code
Wikidata item
 




Print/export  



Download as PDF
Printable version
 
















Appearance
   

 






From Wikipedia, the free encyclopedia
 


Managed code is computer program code that requires and will execute only under the management of a Common Language Infrastructure (CLI); Virtual Execution System (VES); virtual machine, e.g. .NET, CoreFX, or .NET Framework; Common Language Runtime (CLR); or Mono. The term was coined by Microsoft.

Managed code is the compiler output of source code written in one of over twenty high-level programming languages, including C#, J# and Visual Basic .NET.

Terminology[edit]

The true and fine distinction between managed and unmanaged code is prevalent and only relevant when developing applications that interact with CLR implementations. Since many[which?] older programming languages have been ported to the CLR, the differentiation is needed to identify managed code, especially in a mixed setup. In this context, code that does not rely on the CLR is termed "unmanaged".

A source of confusion was created when Microsoft started connecting the .NET Framework with C++, and the choice of how to name the Managed Extensions for C++. It was first named Managed C++ and then renamed to C++/CLI. The creator of the C++ programming language and member of the C++ standards committee, Bjarne Stroustrup, even commented on this issue, "On the difficult and controversial question of what the CLI binding/extensions to C++ is to be called, I prefer C++/CLI as a shorthand for 'The CLI extensions to ISO C++'. Keeping C++ as part of the name reminds people what is the base language and will help keep C++ a proper subset of C++ with the C++/CLI extensions."[1]

Uses[edit]

The Microsoft Visual C++ compiler can produce both managed code, running under CLR, or unmanaged binaries, running directly on Windows.[2]

Benefits of using managed code include programmer convenience (by increasing the level of abstraction, creating smaller models) and enhanced security guarantees, depending on the platform (including the VM implementation). There are many historical examples of code running on virtual machines, such as the language UCSD Pascal using p-code, and the operating system Inferno from Bell Labs using the Dis virtual machine. Java popularized this approach with its bytecode executed by the Java virtual machine.

Google also mention that Java and Kotlin are managed code in their Android NDK JNI documents [3][4]

References[edit]

  1. ^ Stroustrup, Bjarne (2009-06-29). "Bjarne Stroustrup's FAQ: What do you think of C++/CLI?". Retrieved 2009-06-29.
  • ^ Gregory, Kate (2003-04-28). "Managed, Unmanaged, Native: What Kind of Code Is This?". Retrieved 2009-04-22.
  • ^ "JNI tips | Android NDK". Android Developers. Retrieved 2020-06-21.
  • ^ "Getting started with C++ and Android Native Activities".
  • External links[edit]


    Retrieved from "https://en.wikipedia.org/w/index.php?title=Managed_code&oldid=1229010935"

    Category: 
    .NET terminology
    Hidden categories: 
    Articles with short description
    Short description is different from Wikidata
    Articles needing additional references from April 2019
    All articles needing additional references
    All articles with specifically marked weasel-worded phrases
    Articles with specifically marked weasel-worded phrases from April 2019
     



    This page was last edited on 14 June 2024, at 10:30 (UTC).

    Text is available under the Creative Commons Attribution-ShareAlike License 4.0; additional terms may apply. By using this site, you agree to the Terms of Use and Privacy Policy. Wikipedia® is a registered trademark of the Wikimedia Foundation, Inc., a non-profit organization.



    Privacy policy

    About Wikipedia

    Disclaimers

    Contact Wikipedia

    Code of Conduct

    Developers

    Statistics

    Cookie statement

    Mobile view



    Wikimedia Foundation
    Powered by MediaWiki