GATTServApp_DeregisterService函数调用问题

你好,


/**

 * @brief   Deregister a service's attribute list and callback functions from

 *          the GATT Server Application.

 *

 *          NOTE: It's the caller's responsibility to free the service attribute

 *          list returned from this API.

 *

 * @param   handle - handle of service to be deregistered

 * @param   p2pAttrs - pointer to array of attribute records (to be returned)

 *

 * @return  SUCCESS: Service deregistered successfully.

 *          FAILURE: Service not found.

 */

extern bStatus_t GATTServApp_DeregisterService( uint16 handle, gattAttribute_t **p2pAttrs );



请问这个函数,描述中写到

It's the caller's responsibility to free the service attribute list returned from this API.


如何free service attribute?


可以按照下图添加代码:

emobile_2023-02-27_10-57-25.png


只有登录才能回复,可以选择微信账号登录