I'm using ESPAsyncWebServer to serve an ESP32CAM image to a web page (a pointer to the image buffer has been stored in a FreeRTOS queue by a different task):
Now I want to delete the buffer and free the memory with:
esp_camera_fb_return(photoBuffer);
But I can't do it right after the call to send_P() because that function returns almost immediately while the buffer is still being served in the background.
So, does ESPAsyncWebServer provide a callback or other method to inform my code that the entire buffer has been served and may now be deleted?
I'm using ESPAsyncWebServer to serve an ESP32CAM image to a web page (a pointer to the image buffer has been stored in a FreeRTOS queue by a different task):
Now I want to delete the buffer and free the memory with:
esp_camera_fb_return(photoBuffer);
But I can't do it right after the call to send_P() because that function returns almost immediately while the buffer is still being served in the background.So, does ESPAsyncWebServer provide a callback or other method to inform my code that the entire buffer has been served and may now be deleted?
Thanks.