pub unsafe extern "C" fn OH_NativeBuffer_Reference(
buffer: *mut OH_NativeBuffer,
) -> i32Available on crate feature
native_buffer only.Expand description
Adds the reference count of a OH_NativeBuffer.
This interface needs to be used in conjunction with OH_NativeBuffer_Unreference, otherwise memory leaks will occur.
This interface is a non-thread-safe type interface.
Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeBuffer
§Arguments
buffer- Indicates the pointer to a OH_NativeBuffer instance.
§Returns
- Returns an error code, 0 is success, otherwise, failed.
Available since API-level: 9
Version: 1.0