Exception Safety in Qt

前端 未结 4 2057
Happy的楠姐
Happy的楠姐 2020-12-30 02:44

Wikipedia says that \"A piece of code is said to be exception-safe, if run-time failures within the code will not produce ill effects, such as memory leaks, garbled stored d

4条回答
  •  孤城傲影
    2020-12-30 03:16

    Qt is (mostly) not exception safe: http://doc.qt.io/archives/4.6/exceptionsafety.html

    On the other hand dealing with exceptions correctly in event driven programming is very hard, so best is to avoid them when using Qt and pass error codes.

提交回复
热议问题