Lecture overview -- Keyboard shortcut: 'u'  Previous page: Use of constructors -- Keyboard shortcut: 'p'  Next page: A class that needs a destructor -- Keyboard shortcut: 'n'  Lecture notes - all slides together  Annotated slide -- Keyboard shortcut: 't'  Alphabetic index  Help page about these notes  Course home    Abstraction Mechanisms, Part 1 - slide 9 : 36

Destructors

Destructors are essential for resource management purposes in C++

Most classes do not need destructors

Destructors are called implicitly

point.h
Class Point with a destructor.
point.cc
Implementation of the destructor that reveal its activation.
prog2.cc
Illustration of destructor activation when automatic variables go out of scope .
program-output
Actual program output.