OH_NativeWindow_NativeObjectReference

Function OH_NativeWindow_NativeObjectReference 

Source
pub unsafe extern "C" fn OH_NativeWindow_NativeObjectReference(
    obj: *mut c_void,
) -> i32
Available on crate feature native_window only.
Expand description

Adds the reference count of a native object.

This interface needs to be used in conjunction with OH_NativeWindow_NativeObjectUnreference, otherwise memory leaks will occur.

This interface is a non-thread-safe type interface.

Required System Capabilities: SystemCapability.Graphic.Graphic2D.NativeWindow

§Arguments

  • obj - Indicates the pointer to a OHNativeWindow or OHNativeWindowBuffer instance.

§Returns

  • Returns an error code, 0 is success, otherwise, failed.

Available since API-level: 8

Version: 1.0