Forums before death by AOL, social media and spammers... "We can't have nice things"
|    comp.lang.c++.moderated    |    Moderated discussion of C++ superhackery    |    33,346 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 32,543 of 33,346    |
|    Francis Glassborow to MiB    |
|    Re: Exception in Constructor    |
|    17 Sep 12 21:24:40    |
      From: francis.glassborow@btinternet.com              On 17/09/2012 22:24, MiB wrote:       > Am Montag, 17. September 2012 16:20:37 UTC+2 schrieb Stuart:       >> Huh? What does Garbage Collection have to do with this? The example       >> you have provided below deals pretty well with dynamically       >> allocated memory inside an exception-safe constructor.       >       > In a garbage collected environment you do not need to care at all       > about the problem in your program code; the memory allocated       > dynamically in the constructor is free game to the gc next time it       > runs since there are no more references to it. Please, lets not       > have a pointless quarrel about whether one memory model is superior       > to the other by design, I think we can agree that both approaches       > (deterministic new / delete responsibilities vs. non-deterministic       > garbage collection) have their advantages and flaws and a flame war       > on this will provide no progress on the OP's inquiry.       >       > [..]       >> The C++ way of doing this would be:       >> #include |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca