oskardolch / SteamCAD

2D CAD especially designed to draw steam locomotives
GNU General Public License v3.0
194 stars 14 forks source link

Improve exception safety with smart pointers #12

Open elfring opened 4 years ago

elfring commented 4 years ago

Would you like to wrap any pointer data members with the class template “std::unique_ptr”?

Update candidates:

oskardolch commented 4 years ago

Rather not.

elfring commented 4 years ago

I suggest to achieve safe resource management.

oskardolch commented 4 years ago

Basically this is exactly what I don't want. I have quite negative experience with various "garbage collectors", either they don't work as required, or the overhead is enormous. I am quite self confident that I manage the memory manually. Of course, there are some random occasional crashes, but I don't think the rate dramatically exceeds the rate of crashes of "garbage collector"-ed applications. So I believe the benefit of application speed highly prevails the "stability" of slow, but memory safe applications.

elfring commented 4 years ago

Do you really want to reject safe resource management (according to known practices)?

oskardolch commented 4 years ago

I am sorry but you look like a sort of SW police :-) What is actually your goal?

elfring commented 4 years ago

I would appreciate if also your software implementation will be improved another bit.