Thread: uhm... calling a destructor manually

  1. #1
    Registered User
    Join Date
    Jan 2002
    Posts
    552

    uhm... calling a destructor manually

    if you call abort somewhere in your program, will the memory you allocated before be automatically dealloated (even in shared mem environments, i think my prof said that it wouldnt). If not, would calling a class's destructor by hand cause any adverse effects? (no, im not actually trying to do this, just curious)

  2. #2
    Banal internet user
    Join Date
    Aug 2002
    Posts
    1,380
    *furrows brow*

    I believe that exit invokes automatic destructors, while abort does not... you can call destructors manually before an abort, but why would you when you can use exit and have it done automatically?

  3. #3
    Registered User
    Join Date
    Jan 2002
    Posts
    552
    because that "abnormal program termination" message rules! :0)

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Stack issues when calling a COM library
    By notnot in forum C Programming
    Replies: 3
    Last Post: 06-01-2009, 02:12 AM
  2. calling functions within functions
    By edd1986 in forum C Programming
    Replies: 3
    Last Post: 03-29-2005, 03:35 AM
  3. calling default instead of argument constructor, why?!
    By cppn00b in forum C++ Programming
    Replies: 6
    Last Post: 01-30-2005, 04:24 AM
  4. calling conventions
    By Micko in forum C Programming
    Replies: 2
    Last Post: 07-18-2004, 09:13 AM
  5. Question on function syntax and calling function
    By cbrman in forum C Programming
    Replies: 10
    Last Post: 10-05-2003, 05:32 PM