Managed Languages and Garbage Collection

Managed Languages and Garbage Collection

C# and VB.Net are both managed languages. This has two major implications. First, both are compiled to an intermediate low-level language, and a common language runtime (CLR) is used to execute this compiled code, perhaps compiling it further first. So, not only do C# and VB.Net share the same runtime libraries, they are to a large degree two sides of the same coin and two aspects of the same language system. The differences are that VB7 is more Visual Basic like and a bit easier for VB programmers to learn and use. C# on the other hand is more C++ and Java- like, and may appeal more to programmers already experienced in those languages.

 

The other major implication is that managed languages are garbagecollected. Garbage collected languages take care of releasing unused memory: you never have to be concerned with this. As soon as the garbage collection system detects that there are no more active references to a

Variable, array or object, the memory is released back to the system. So you no longer need to worry as much about running out of memory because you allocated memory and never released it. Of course, it is still possible to write memory-eating code, but for the most part you do not

have to worry about memory allocation and release problems.

 

Shashi Ray

Next Recommended Reading What is managed code and managed data?