uhm... calling a destructor manually

This is a discussion on uhm... calling a destructor manually within the C++ Programming forums, part of the General Programming Boards category; if you call abort somewhere in your program, will the memory you allocated before be automatically dealloated (even in shared ...

  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
    BMJ
    BMJ is offline
    Banal internet user BMJ's Avatar
    Join Date
    Aug 2002
    Location
    Chicagoland
    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, 03: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, 10:13 AM
  5. Question on function syntax and calling function
    By cbrman in forum C Programming
    Replies: 10
    Last Post: 10-05-2003, 06:32 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21