August 2013
Beginner
540 pages
12h 51m
English
After completing this chapter, you will be able to:
Describe how Microsoft .NET memory management differs from traditional C++ memory management.
Provide finalizers and destructors for your classes.
Create objects by using stack semantics.
Now that you know how to create objects in C++/CLI by using the gcnew operator, it’s time to learn how to control object lifetimes as well as another way to create and use objects.
We’ve seen what happens at the start of an object’s life, but what happens when an object is no longer required?
There are two things that need to happen when an object comes to the end of its life:
You might want to do some clean-up before the object is destroyed, ...