call a destructor

This is a discussion on call a destructor within the C++ Programming forums, part of the General Programming Boards category; So Fordy it really translates to an actual CALL or JMP in assembly? Interesting. IMO C++ translates into an awful ...

  1. #16
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,584
    So Fordy it really translates to an actual CALL or JMP in assembly? Interesting.

    IMO C++ translates into an awful lot of jumping and calling which all of us asm programmers know is bad. How do they optimize this - especially with virtual classes and functions?

  2. #17
    &TH of undefined behavior Fordy's Avatar
    Join Date
    Aug 2001
    Posts
    5,786
    Originally posted by Bubba
    So Fordy it really translates to an actual CALL or JMP in assembly? Interesting.
    As far as I know.....I know if you follow through in debug mode you see the call...but then I guess it may be a different story for release mode......

    Originally posted by Bubba
    IMO C++ translates into an awful lot of jumping and calling which all of us asm programmers know is bad. How do they optimize this - especially with virtual classes and functions?
    I suppose a lot of this depends on the code....use of inline can make a big difference if used properly (with all those operator overloads), and the compiler has a fair amount of leeway when it's optomising.
    Also, when you see all those calls in your dissasembly, is it from following a debug build? If so, you may find a lot of those calls dissapear in release mode because compilers may disable inlining for debug builds

  3. #18
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,584
    Very interesting. However, I think we've gone beyond the scope of this thread....again.

    I do that all the time. Sorry guys.

Page 2 of 2 FirstFirst 12
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Call external C programs and receive data
    By ferenczi in forum C Programming
    Replies: 11
    Last Post: 02-12-2008, 11:32 AM
  2. howto add sys call using modules only ?
    By pinkeshzaveri in forum Linux Programming
    Replies: 1
    Last Post: 08-23-2005, 12:28 PM
  3. DirectMusic engine problem
    By VirtualAce in forum Game Programming
    Replies: 7
    Last Post: 03-17-2005, 05:12 PM
  4. Iterative Tree Traversal using a stack
    By BigDaddyDrew in forum C++ Programming
    Replies: 7
    Last Post: 03-10-2003, 04:44 PM
  5. call by reference and a call by value
    By IceCold in forum C Programming
    Replies: 4
    Last Post: 09-08-2001, 05:06 PM

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