SWRU271I October 2010 – January 2020 CC2540 , CC2540T , CC2541 , CC2541-Q1 , CC2640R2F
TI recommends using the SetParameter function (that is, SimpleProfile_SetParameter()) and call GATTServApp_ProcessCharCfg() to send a GATT notification or indication. If using GATT_Notification() or GATT_Indication() directly, you require additional memory management. For additional memory management, do the following:
NOTE
If the return value of the notification or indication is SUCCESS (0x00), the stack freed the memory.
If the return value is something other than SUCCESS (that is, blePending), free the memory using GATT_bm_free().
The following is an example of this allocation in the gattServApp_SendNotiInd() function in gattservapp_util.c: