Abstract
In this chapter we consolidate our previous discussion of constructor functions and introduce destructor functions. A constructor is invoked whenever an object is created and a destructor is invoked whenever an object is destroyed. Constructors are often invoked by the compiler, rather than as an explicit part of a user-supplied statement; destructors are also often invoked by the compiler but almost never as an explicit part of a user-supplied statement.
This is a preview of subscription content, log in via an institution.
Buying options
Tax calculation will be finalised at checkout
Purchases are for personal use only
Learn about institutional subscriptionsPreview
Unable to display preview. Download preview PDF.
Author information
Authors and Affiliations
Rights and permissions
Copyright information
© 1994 Springer-Verlag London Limited
About this chapter
Cite this chapter
Capper, D.M. (1994). Constructors and Destructors. In: C++ for Scientists, Engineers and Mathematicians. Springer, London. https://doi.org/10.1007/978-1-4471-3368-1_10
Download citation
DOI: https://doi.org/10.1007/978-1-4471-3368-1_10
Publisher Name: Springer, London
Print ISBN: 978-3-540-19847-5
Online ISBN: 978-1-4471-3368-1
eBook Packages: Springer Book Archive