Advertisement
Guest User

Untitled

a guest
May 20th, 2019
83
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.88 KB | None | 0 0
  1. * Advantage of KisSharedPtr over boost pointer ?
  2. * The difference with boost share pointer is that in boost::shared_ptr,
  3. * the counter is kept inside the smart pointer, meaning that you should
  4. * never never remove the pointer from its smart pointer object, because if
  5. * you do that, and somewhere in the code, the pointer is put back in a smart
  6. * pointer, then you have two counters, and when one reach zero, then the object
  7. * gets deleted while some other code thinks the pointer is still valid.
  8. *
  9. * Inconvenient of KisSharedPtr over boost pointer ?
  10. * KisSharedPtr requires the class to inherits KisShared.
  11. *
  12. * Difference with QSharedDataPointer
  13. * QSharedDataPointer and KisSharedPtr are very similar, but QSharedDataPointer
  14. * has an explicit constructor which makes it more painfull to use in some
  15. * construct. And QSharedDataPointer doesn't offer a weak pointer.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement