语言

Menu
Sites
Language
[Bluetooth] Memory Leak when using Bluetooth GATT server

On a wearable native project create gatt server:

bt_initialize();
bt_gatt_server_initialize();
bt_gatt_server_create(&gattServer);
bt_gatt_service_create(service_uuid, type, &gattSvc);
bt_gatt_characteristic_create( ...  )

// set callback for read request
bt_gatt_server_set_read_value_requested_cb

 

inside the callback call:

bt_gatt_server_send_response

this causes memory leak.

using nRF connect perform many read requests. values are coming ok.

memory leaks very fast.