Lesson 3.1: Introduction To Memory

Class Meeting:

Section Slides Annotated Slides Video
12–1PM 3.1-memory-203-1221.pdf Download 3.1-memory-203-1221.pdf PDF Download PDF

See Zoom Cloud Recordings

1–2PM 3.1-memory-pointers-1pm.pdf Download 3.1-memory-pointers-1pm.pdf   3.1-memory-pointers-1pm-annotated.pdf Download 3.1-memory-pointers-1pm-annotated.pdf 

See Zoom Cloud Recordings

4–5PM 3.1-memory-pointers-4pm.pdf Download 3.1-memory-pointers-4pm.pdf  3.1-memory-pointers-4pm-annotated.pdf Download 3.1-memory-pointers-4pm-annotated.pdf  

See Zoom Cloud Recordings


Readings:


Summary:

This video contains a subset of the presentation included in the C++ short course. We explore memory, and we practice manipulating and maintaining variables whose values are memory addresses, which we call pointers. Heap and stack memory are contrasted, and common gotchas are exposed. 

 


Learning Outcomes:

  • Declare and initialize pointer variables on the stack.
  • Declare and initialize pointer variables on the heap.
  • Gain facility with pointer assignment.
  • Recognize the need for responsible heap memory cleanup using delete.
  • Identify insidious bugs.