| Version 1.9 Build 1556
|
|
Next: Type Conversions
Up: Programming Tips
Previous: Identifiers
A virtual destructor will be defined for a base class when ALL of the
following hold:
4.1
- The destructor in a derived class is different from the base class
destructor
- Derived class objects may be deleted via a pointer or reference to
base class objects.
However, the designer may have reasons for making the destructor
virtual when these do not hold.
Use copy constructors sparingly to avoid unecessary overhead.
Watch out for calls by reference and calls by value.
Next: Type Conversions
Up: Programming Tips
Previous: Identifiers
  Contents
  Index
Please send questions or comments about AIPS++ to aips2-request@nrao.edu.
Copyright © 1995-2000 Associated Universities Inc.,
Washington, D.C.
Return to AIPS++ Home Page
2006-10-15