SteamCAD icon indicating copy to clipboard operation
SteamCAD copied to clipboard

Improve exception safety with smart pointers

Open elfring opened this issue 4 years ago • 6 comments

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

Update candidates:

elfring avatar Apr 04 '20 06:04 elfring

Rather not.

oskardolch avatar Apr 08 '20 20:04 oskardolch

I suggest to achieve safe resource management.

elfring avatar Apr 09 '20 05:04 elfring

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.

oskardolch avatar Apr 21 '20 19:04 oskardolch

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

elfring avatar Apr 21 '20 20:04 elfring

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

oskardolch avatar Apr 21 '20 20:04 oskardolch

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

elfring avatar Apr 22 '20 06:04 elfring