Function nvcvImageDecRef

Function Documentation

NVCVStatus nvcvImageDecRef(NVCVImageHandle handle, int *newRefCount)

Decrements the reference count of an existing image instance.

The image is destroyed when its reference count reaches zero.

If the image has type NVCV_TYPE_IMAGE_WRAPDATA and has a cleanup function defined, cleanup will be called.

Note

The image must not be in use in current and future operations.

Parameters:
  • handle[in] Image to be destroyed. If NULL, no operation is performed, successfully.

    • The handle must have been created with any of the nvcvImageConstruct functions.

  • newRefCount[out] The decremented reference count. If the return value is 0, the object was destroyed. Can be NULL, if the caller isn’t interested in the new reference count.

Return values:
  • NVCV_ERROR_INVALID_ARGUMENT – The handle is invalid

  • NVCV_SUCCESS – Operation executed successfully.