News for hackers. Stuff that matters.
Re:A bug in GCC that may cause memory leaks in valid C++ pro... by reallifecoder on Thursday April 27, 2017 @05:51PM (#14215059)
Any C++ programmer knows that bad things happen when throwing in a ctor. Just don't do it. This is a non problem.
Re:A bug in GCC that may cause memory leaks in valid C++ pro... by YSFEJ4SWJUVU6 on Thursday April 27, 2017 @06:09PM (#14215204)
No. Just no.
Re:A bug in GCC that may cause memory leaks in valid C++ pro... by CamperBob2 on Thursday April 27, 2017 @06:17PM (#14215261)
The RAII doctrine leaves you little choice, since the architects of C++ decided that constructors wouldn't be allowed to return NULL to indicate failure, or otherwise signal it in an easily-detectable manner.

That's why I don't use RAII. It comes with a massive amount of baggage.

Re:A bug in GCC that may cause memory leaks in valid C++ pro... by johncolanduoni on Thursday April 27, 2017 @08:27PM (#14215987)
You can do RAII without constructors (e.g. Rust)
Re:A bug in GCC that may cause memory leaks in valid C++ pro... by CamperBob2 on Thursday April 27, 2017 @09:51PM (#14216347)
Yep. There are any number of ways that C++ could have supported RAII without requiring either exceptions or a lot of unnecessary hacking, but they didn't.