Thread: seg fault while deteting the dynamically allocated memory

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    45
    Hmm interesting. So u cannot delete an array with delete() ? I tried delete [] student_details and it worked. I am also learning c++ after learning c. So I thought all free() translate to delete() irrespective of being an element or an array.

    Thank you for your help.

    Someone above mentioned it worked for him. Is this behaviour system dependent?

    -livin
    Last edited by livin; 10-16-2012 at 12:46 PM.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Freeing dynamically allocated memory
    By kkk in forum C Programming
    Replies: 4
    Last Post: 05-30-2011, 12:24 PM
  2. Replies: 2
    Last Post: 10-18-2010, 07:52 AM
  3. Dynamically allocated memory
    By ^xor in forum Linux Programming
    Replies: 9
    Last Post: 06-28-2005, 11:42 AM
  4. Checking if memory has been dynamically allocated
    By Xzyx987X in forum C Programming
    Replies: 28
    Last Post: 03-14-2004, 06:53 PM
  5. deleting dynamically allocated memory...
    By heljy in forum C++ Programming
    Replies: 2
    Last Post: 09-08-2002, 11:40 AM