CMSC 202 Computer Science II, Fall 2015, Section 06
Lecture 12: Dynamic Memory Allocation
Thu 10/08, 2015
Assigned Reading: 10.1-10.3
Slides As Shown:
- Project 2 questions.
- Finish overloading operators.
- Using new and delete for memory allocation.
- Memory allocation and destructors:
A class DMC with a dynamically allocated array:
A simple example with destructors being invoked when objects
go out of scope:
Destructors and loops:
Temporary objects in expressions:
DMC as data member in AClass:
8 Oct 2015 14:49:54 EDT