Thread: Destructors in dynamically allocated arrays

  1. #1

    Destructors in dynamically allocated arrays

    If I have a dynamically allocated array of objects with destructors defined, and I use delete[] on the array, will all the destructors be called?

  2. #2
    Gronkulator of Surds littleweseth's Avatar
    Join Date
    Oct 2003
    Posts
    68
    yes, they will. make sure you include the square brakcets though , or memory leaks for all
    Ph33r the sphericalCUBE

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. swap dynamically allocated arrays
    By myle in forum C Programming
    Replies: 9
    Last Post: 05-18-2008, 09:04 AM
  2. Dynamically allocated size
    By maverickbu in forum C++ Programming
    Replies: 12
    Last Post: 06-26-2007, 01:16 PM
  3. 2D Dynamically allocated pointer arrays
    By Lionmane in forum C Programming
    Replies: 37
    Last Post: 06-11-2005, 10:39 PM
  4. Dynamically allocated arrays
    By axe786 in forum C Programming
    Replies: 6
    Last Post: 12-03-2004, 12:41 AM