MCPcopy Create free account
hub / github.com/apache/tvm-ffi / reset

Method reset

include/tvm/ffi/object.h:568–573  ·  view source on GitHub ↗

! \brief reset the content of ptr to be nullptr */

Source from the content-addressed store, hash-verified

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 */

Callers 1

~ObjectPtrMethod · 0.95

Calls 1

DecRefMethod · 0.80

Tested by

no test coverage detected