Should non-QObject derived classes “always” be put on the stack?

后端 未结 2 846
没有蜡笔的小新
没有蜡笔的小新 2021-01-03 02:18

Coming from the Symbian world, I\'m used to using the heap as much as possible to avoid running out of stack space, especially when handling descriptors. CBase derived class

2条回答
  •  情深已故
    2021-01-03 02:45

    QString, and many other Qt classes, use implicit data sharing. That implies that memory is generally allocated on the heap.

提交回复
热议问题