! \brief reset the content of ptr to be nullptr */
| 566 | explicit operator bool() const { return get() != nullptr; } |
| 567 | /*! \brief reset the content of ptr to be nullptr */ |
| 568 | void reset() { |
| 569 | if (data_ != nullptr) { |
| 570 | data_->DecRef(); |
| 571 | data_ = nullptr; |
| 572 | } |
| 573 | } |
| 574 | /*! \return The use count of the ptr, for debug purposes */ |
| 575 | int use_count() const { return data_ != nullptr ? data_->use_count() : 0; } |
| 576 | /*! \return whether the reference is unique */ |