4

Ever used std::shared_ptr in a Qt-Project? Just Don't!

Comments
  • 0
    QSharedPointer ? :D
  • 0
    afik are std::shared_ptr not compatible to QSharedPointer. But maybe there is a constructor or converter-function hiding from me.
  • 1
    Most of the time I find myself looking for a shared_ptr (most, not all), it's the sign of a design issue. It has many of the same problems as global state...

    I don't know if QSharedPointer is comparable, simply because I've always found it to be unnecessary after some thought :)
  • 0
    Sometimes, but not all times there is a bigger amounts of data to pass through various object instances. I think this is a reasonable reason for those pointers. I think there are cases where object-references have to be stored and be nullable without being a design flow.
Add Comment