1e41f4b71Sopenharmony_ci# Bundle Manager Subsystem Changelog
2e41f4b71Sopenharmony_ci
3e41f4b71Sopenharmony_ci## cl.bundlemanager.1 Fields appId and appIdentifier Are Added to OH_NativeBundle_ApplicationInfo and Memory Must Be Manually Released
4e41f4b71Sopenharmony_ci
5e41f4b71Sopenharmony_ci**Access Level**
6e41f4b71Sopenharmony_ci
7e41f4b71Sopenharmony_ciPublic
8e41f4b71Sopenharmony_ci
9e41f4b71Sopenharmony_ci**Reason for Change**
10e41f4b71Sopenharmony_ci
11e41f4b71Sopenharmony_ciThe **appId** and **appIdentifier** fields are added to the [OH_NativeBundle_ApplicationInfo](../../../application-dev/reference/native-apis/_o_h___native_bundle_application_info.md) struct.
12e41f4b71Sopenharmony_ci
13e41f4b71Sopenharmony_ci**Change Impact**
14e41f4b71Sopenharmony_ci
15e41f4b71Sopenharmony_ciFor a native application developed using API version 11 or later, you must manually release the memory allocated for the **appId** and **appIdentifier** fields in the **OH_NativeBundle_ApplicationInfo** struct; otherwise, memory leak occurs. If the native application is developed using APIs earlier than API version 11, no adaptation is required.
16e41f4b71Sopenharmony_ci
17e41f4b71Sopenharmony_ci**Change Since**
18e41f4b71Sopenharmony_ci
19e41f4b71Sopenharmony_ciOpenHarmony SDK 4.1.3.2
20e41f4b71Sopenharmony_ci
21e41f4b71Sopenharmony_ci**Key API/Component Changes**
22e41f4b71Sopenharmony_ci
23e41f4b71Sopenharmony_ciAn application calls [OH_NativeBundle_GetCurrentApplicationInfo](../../../application-dev/reference/native-apis/native__interface__bundle.md#oh_nativebundle_getcurrentapplicationinfo) to query its own information.
24e41f4b71Sopenharmony_ci
25e41f4b71Sopenharmony_ci**Adaptation Guide**
26e41f4b71Sopenharmony_ci
27e41f4b71Sopenharmony_ciIf your application is a native application developed using API version 11 or later, manually release the memory allocated for **appId** and **appIdentifier**.
28e41f4b71Sopenharmony_ci
29e41f4b71Sopenharmony_ciSample code:
30e41f4b71Sopenharmony_ci
31e41f4b71Sopenharmony_ci ```c++
32e41f4b71Sopenharmony_ci    static napi_value GetCurrentApplicationInfo(napi_env env, napi_callback_info info)
33e41f4b71Sopenharmony_ci    {
34e41f4b71Sopenharmony_ci        // Call the native API to obtain the application information.
35e41f4b71Sopenharmony_ci        OH_NativeBundle_ApplicationInfo nativeApplicationInfo = OH_NativeBundle_GetCurrentApplicationInfo();
36e41f4b71Sopenharmony_ci        napi_value result = nullptr;
37e41f4b71Sopenharmony_ci        napi_create_object(env, &result);
38e41f4b71Sopenharmony_ci        // Convert the bundle name obtained by calling the native API to the bundleName attribute in the JavaScript object.
39e41f4b71Sopenharmony_ci        napi_value bundleName;
40e41f4b71Sopenharmony_ci        napi_create_string_utf8(env, nativeApplicationInfo.bundleName, NAPI_AUTO_LENGTH, &bundleName);
41e41f4b71Sopenharmony_ci        napi_set_named_property(env, result, "bundleName", bundleName);
42e41f4b71Sopenharmony_ci        // Convert the fingerprint information obtained by calling the native API to the fingerprint attribute in the JavaScript object.
43e41f4b71Sopenharmony_ci        napi_value fingerprint;
44e41f4b71Sopenharmony_ci        napi_create_string_utf8(env, nativeApplicationInfo.fingerprint, NAPI_AUTO_LENGTH, &fingerprint);
45e41f4b71Sopenharmony_ci        napi_set_named_property(env, result, "fingerprint", fingerprint);
46e41f4b71Sopenharmony_ci
47e41f4b71Sopenharmony_ci        char* appId = OH_NativeBundle_GetAppId();
48e41f4b71Sopenharmony_ci        // Convert the application ID obtained by calling the native API to the appId attribute in the JavaScript object.
49e41f4b71Sopenharmony_ci        napi_value napi_appId;
50e41f4b71Sopenharmony_ci        napi_create_string_utf8(env, appId, NAPI_AUTO_LENGTH, &napi_appId);
51e41f4b71Sopenharmony_ci        napi_set_named_property(env, result, "appId", napi_appId);
52e41f4b71Sopenharmony_ci
53e41f4b71Sopenharmony_ci        char* appIdentifier = OH_NativeBundle_GetAppIdentifier();
54e41f4b71Sopenharmony_ci        // Convert the application identifier obtained by calling the native API to the appIdentifier attribute in the JavaScript object.
55e41f4b71Sopenharmony_ci        napi_value napi_appIdentifier;
56e41f4b71Sopenharmony_ci        napi_create_string_utf8(env, appIdentifier, NAPI_AUTO_LENGTH, &napi_appIdentifier);
57e41f4b71Sopenharmony_ci        napi_set_named_property(env, result, "appIdentifier", napi_appIdentifier);
58e41f4b71Sopenharmony_ci        // To prevent memory leak, manually release the memory.
59e41f4b71Sopenharmony_ci        free(nativeApplicationInfo.bundleName);
60e41f4b71Sopenharmony_ci        free(nativeApplicationInfo.fingerprint);
61e41f4b71Sopenharmony_ci        free(appId);
62e41f4b71Sopenharmony_ci        free(appIdentifier);
63e41f4b71Sopenharmony_ci        return result;
64e41f4b71Sopenharmony_ci    }
65e41f4b71Sopenharmony_ci```
66e41f4b71Sopenharmony_ci
67e41f4b71Sopenharmony_ciFor details, see [Native Bundle Development](../../../application-dev/napi/native-bundle-guidelines.md).
68