Thread: difference?

  1. #1
    ????
    Guest

    Question difference?

    whats the difference bet. new operator and destructor?

  2. #2
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,793

    Re: difference?

    Originally posted by ????
    whats the difference bet. new operator and destructor?
    Well quite a bit...

    operator new allocates memory on the free store and returns a type safe pointer to that memory

    destructors are class member functions that allow you to de-allocate memory and do general house keeping before the object is destroyed...

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Review required for program of date difference
    By chottachatri in forum C Programming
    Replies: 6
    Last Post: 10-31-2008, 11:46 AM
  2. Difference Equations / Recurrence Relations
    By DavidP in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 10-05-2007, 10:26 AM
  3. What's the difference between var++ and ++var
    By ulillillia in forum C Programming
    Replies: 6
    Last Post: 05-31-2007, 02:27 AM
  4. how to get difference of digits
    By Leeman_s in forum C++ Programming
    Replies: 5
    Last Post: 12-20-2001, 08:32 PM
  5. What is the Difference between ANSI C and non-ANSI C ?
    By Unregistered in forum C Programming
    Replies: 1
    Last Post: 11-24-2001, 06:55 AM