Pointers - UAH CPE 212 Fundamentals of Software Engineering...

Info iconThis preview shows pages 1–5. Sign up to view the full content.

View Full Document Right Arrow Icon
UAH CPE 212 Fundamentals of Software Engineering Agenda Class 5 Pointers and Dynamic Memory Pointers and Dynamic memory Key Concepts
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
UAH CPE 212 Help Resources First Read Text Ask questions in class email Next Schedule extra instruction time
Background image of page 2
UAH CPE 212 Pointer Review Memory Layout Address Data Heap Memory? Symbols - 2 interpretations * Declaring pointers Defining (Initializing) Pointers Address of De-reference new and delete Single Objects Multiple Objects Assignment Statements! Leaky memory Gotcha: Failure to initialize the pointer Address Data NOTE: OBJECTS or arrays of objects Pro: Speed Con: Complexity!
Background image of page 3

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
UAH CPE 212 Objects and the Memory Manager New is a 2 step process Allocates space Constructs the object If array calls constructor many times Error handling Operator overloads objects and global In place construction Delete is a 2 step process Destroys the object De-Allocates the space If array, calls the destructor many times Error handling Operator overloads objects and global Suicidal code
Background image of page 4
Image of page 5
This is the end of the preview. Sign up to access the rest of the document.

This note was uploaded on 06/09/2008 for the course CPE 212 taught by Professor Skipper during the Spring '07 term at University of Alabama in Huntsville.

Page1 / 13

Pointers - UAH CPE 212 Fundamentals of Software Engineering...

This preview shows document pages 1 - 5. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online