C / C++ / C#

  1. Home
  2. Computing & Technology
  3. C / C++ / C#

Definition of Destructor

By David Bolton, About.com

Definition: A Destructor is a class member function in C++ and C# that has the same name as the class itself with a tilde ~ prefix.

The purpose of the destructor is to release or relinquish all resources such as memory, close any open files etc when an object of this class is destroyed. Typically such resources will have been acquired by the class constructor.

Glossary:

A B C D E F G H I J K L M N O P Q R S T U V W X Y Z

Explore C / C++ / C#

About.com Special Features

Build Your Own Website

Step-by-step advice on how to do everything from choosing a Web host to promoting your content. More >

Connect Your Home Computers

Easy ways to connect two computers for networking purposes. More >

C / C++ / C#

  1. Home
  2. Computing & Technology
  3. C / C++ / C#
  4. Glossary
  5. Destructor - Definition

©2009 About.com, a part of The New York Times Company.

All rights reserved.