Callback's flaws

前端 未结 3 1052
醉酒成梦
醉酒成梦 2021-01-22 16:04

From: http://doc.qt.nokia.com/4.7/signalsandslots.html

Callbacks have two fundamental flaws: Firstly, they are not type-safe. We can never be certain

3条回答
  •  终归单人心
    2021-01-22 16:41

    It's a pointer to a function, and some compilers don't check that in run time there won't be a case where that pointer leads to a function with different parameters than expected.

提交回复
热议问题