Unmanaged Code Can Introduce Memory Leaks

I'll go ahead and admit it now: When I first started looking into mixing managed and unmanaged code, I was a little skeptical. I wasn't certain that the unmanaged class I created was really unmanaged, and the CLR didn't have anything to do with it. So, I created a little test, which you will now do. As mentioned at the beginning of this hour, memory leaks are a result of allocating memory and then not releasing that memory once your application exits. The C-Runtime library contains a mechanism that allows you to detect any memory leaks within your application and also shows you where these leaks occur. The method to do this is quite simple and should be employed as much as possible. To enable memory leak ...

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.