Skip to content

Commit 9217458

Browse files
authored
Free memory for _currentArgs after request has been handled in WebServer. (esp8266#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.
1 parent ed9e8ce commit 9217458

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

libraries/ESP8266WebServer/src/ESP8266WebServer-impl.h

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -726,9 +726,11 @@ void ESP8266WebServerTemplate<ServerType>::_handleRequest() {
726726
_finalizeResponse();
727727
}
728728
_currentUri = "";
729+
delete[] _currentArgs;
730+
_currentArgs = nullptr;
731+
_currentArgCount = 0;
729732
}
730733

731-
732734
template <typename ServerType>
733735
void ESP8266WebServerTemplate<ServerType>::_finalizeResponse() {
734736
if (_chunked) {

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy