3 ms·
Generally not a problem if you don't use much multi-inheritance. Making your objects exception-safe will have lots of benefits -- and it's exceptions that are f
by thras 17y ago
Generally not a problem if you don't use much multi-inheritance. Making your objects exception-safe will have lots of benefits -- and it's exceptions that are far more likely to be causing leaks in your code than destructor-order issues. Your mileage may vary.
Then again, I don't mean to trivialize the issue. It can be a real problem. But can you suggest a language that will prevent 100% of subtle memory leaks? I can't think of any. Hell, if you're using Ruby with a pre-1.8 VM, you don't even need to roll your own leaks.