Skip to main content
11 events
when toggle format what by license comment
May 11, 2021 at 11:07 comment added Caleth @jwenting I have no trouble with the implicit copy-constructors for all my types, even the implicitly deleted ones
May 11, 2021 at 10:59 comment added jwenting @Caleth as stated, they're finnicky and error prone, usually more a pain than a cure
Apr 18, 2021 at 11:38 comment added Caleth @jwenting copy constructors are fine if you default to subobjects or unique_ptr instead of shared_ptr
Apr 18, 2021 at 6:00 history edited Glorfindel CC BY-SA 4.0
broken link fixed
S Jan 10, 2019 at 17:20 history suggested Andrew Keeton CC BY-SA 4.0
Replace broken link with Wayback link
Jan 10, 2019 at 16:53 review Suggested edits
S Jan 10, 2019 at 17:20
May 16, 2013 at 8:41 comment added jwenting iow RAII was not "abandoned", it simply didn't exist to be abandoned :) As to copy constructors, I've never liked them, too easy to get wrong, they're a constant source of headaches when somewhere deep down someone (else) forgot to make a deep copy, causing resources to be shared between copies that should not be.
May 15, 2013 at 3:35 comment added kevin cline "No need for copy constructors" sounds nice, but fails badly in practice. java.util.Date and Calendar are perhaps the most notorious examples. Nothing lovelier than new Date(oldDate.getTime()).
Jul 13, 2012 at 1:29 comment added supercat The using statement handles many cleanup-related problems nicely, but many others remain. I would suggest that the right approach for a language and framework would be to declaratively distinguish between storage locations which "own" a referenced IDisposable from those which do not; overwriting or abandoning a storage location which owns a referenced IDisposable should dispose the target in the absence of a directive to the contrary.
Nov 8, 2011 at 23:11 comment added BlueRaja - Danny Pflughoeft Also, nice links (especially the first one, which is highly relevant to this discussion).
Nov 8, 2011 at 5:51 history answered dan04 CC BY-SA 3.0