Skip to main content

Constructors and Destructors

  • Chapter
  • 431 Accesses

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

Chapter
USD   29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD   74.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever

Tax calculation will be finalised at checkout

Purchases are for personal use only

Learn about institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

Author information

Authors and Affiliations

Authors

Rights and permissions

Reprints 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

Publish with us

Policies and ethics