ESP32 Heap size reduces when used both ble and mqtt

Hello ,
I am using ESP32 Wroom module.
I have connected successfully both BLE and Mqtt at a same time.

Actually , memory leaks starts when BLE is connected .

There's no issue when executed seperately.

Please Help me with the solution to free the heap memory.
I tried

  1. ESP_bt release

From looking at the code, well formatted in code tags, you posted, I guess that the code on line number is wrong.

How do you know you are having a memory leak issue? Are you using freeRTOS and assigning a task to core0? And looking at that code, formmated and in code tags, on line 7892 are you sure the syntax is correct?

Idahowalker:
From looking at the code, well formatted in code tags, you posted, I guess that the code on line number is wrong.

How do you know you are having a memory leak issue? Are you using freeRTOS and assigning a task to core0? And looking at that code, formmated and in code tags, on line 7892 are you sure the syntax is correct?

I am using ESP.getfreeHype() to know the actual heap size after each operation.