aclFinalizeReference
Applicable Products
Product |
Supported |
|---|---|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
|
√ |
Function
Performs deinitialization to release resources used by acl APIs in a process.
aclFinalizeReference involves 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
1 | 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; otherwise, failure. For details, see aclError.
Restrictions
Before an application 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 an application process exits.
You are not advised to call aclFinalize or aclFinalizeReference in a destructor. Otherwise, the process may exit abnormally due to the unknown singleton destruction order.