MCPcopy Create free account
hub / github.com/NVIDIA/DALI / DecRef

Method DecRef

dali/c_api_2/ref_counting.h:36–41  ·  view source on GitHub ↗

Decrements the reference count and returns the new value. * * When the reference count reaches 0, the object is deleted. */

Source from the content-addressed store, hash-verified

34 * When the reference count reaches 0, the object is deleted.
35 */
36 int DecRef() noexcept {
37 int ret = std::atomic_fetch_sub_explicit(&ref_, 1, std::memory_order_acq_rel) - 1;
38 if (!ret)
39 delete this;
40 return ret;
41 }
42
43 /** Returns the current reference count. */
44 int RefCount() const noexcept {

Callers 4

daliTensorDecRefFunction · 0.80
daliTensorListDecRefFunction · 0.80
RefCountedPtrClass · 0.80
resetMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected