aclFinalizeReference

Applicability

Product

Supported

Atlas A3 training products/Atlas A3 inference products

Atlas A2 training products/Atlas A2 inference products

Atlas 200I/500 A2 inference products

Atlas inference products

Atlas training products

Description

Performs deinitialization to destroy the resources used by the acl API in the process.

aclFinalizeReference involves the implementation of reference counting. Each time aclInit is called, the reference count increases by 1. Each time aclFinalizeReference is called, the reference count decreases by 1. Deinitialization is performed only when the reference count decreases to 0. The difference between aclFinalize and this API is that if aclFinalize is called, the count is cleared, and deinitialization is performed directly.

Prototype

aclError aclFinalizeReference(uint64_t *refCount)

Parameters

Parameter

Input/Output

Description

refCount

Input/Output

Returns the reference count after aclFinalizeReference is called.

If the reference count is not required, you can pass nullptr.

Returns

0 on success; else, failure. For details, see aclError.

Restrictions

Before the app process exits, ensure that aclFinalize or aclFinalizeReference has been called to complete deinitialization. Otherwise, there may be exceptions. For example, an error is reported when the app process exits.

You are not advised to call aclFinalize or aclFinalizeReference in the destructor call. Otherwise, the process may exit abnormally due to the unknown singleton destruction sequence.