Unmanaged and Managed Code Together

One thing that has plagued the C++ language and is often brought up in critique circles isn't the fault of the language but rather is due to developer errors. Memory allocation and pointers contain several advantages, but when used incorrectly, they can lead to slow system degradation. If a program that is running continuously allocates but never frees that allocated memory, you'll soon see the system on which the application is running come to a grinding halt. The .NET Framework and its garbage-collection mechanism were designed to prevent this from happening. Objects are allocated by the developer, but the act of releasing that memory once an object is destroyed is left up to the garbage collector. However, ...

Get Sams Teach Yourself Visual C++® .NET in 24 Hours now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.