1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-04-19 23:22:16 +03:00

Free memory for _currentArgs after request has been handled in WebServer. (#9077)

This can reduce permanent RAM consumption significantly, if the last request had lots of arguments, but it assumes, that we do not need the arguments after we have handled a request.
This commit is contained in:
Clemens Kirchgatterer 2024-02-11 12:27:18 +01:00 committed by GitHub
parent ed9e8ce9ba
commit 9217458353
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -726,9 +726,11 @@ void ESP8266WebServerTemplate<ServerType>::_handleRequest() {
_finalizeResponse();
}
_currentUri = "";
delete[] _currentArgs;
_currentArgs = nullptr;
_currentArgCount = 0;
}
template <typename ServerType>
void ESP8266WebServerTemplate<ServerType>::_finalizeResponse() {
if (_chunked) {