mirror of
https://github.com/tzapu/WiFiManager.git
synced 2026-04-27 09:05:56 +03:00
[GH-ISSUE #619] Memory leak when reset()-ing DNS server #517
Labels
No labels
📶 WiFi
🕸️ HTTP
Branch
DEV Help Wanted
Discussion
Documentation
ESP32
Example
Good First Issue
Hotfix
In Progress
Incomplete
Needs Feeback
Priority
QA
Question
Task
Upstream/Dependancy
bug
duplicate
enhancement
invalid
pull-request
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
starred/WiFiManager#517
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @brianrho on GitHub (Jun 10, 2018).
Original GitHub issue: https://github.com/tzapu/WiFiManager/issues/619
In
startConfigPortal(), after the settings have been saved:I assume the call to
reset()relies on the existence of a destructor for the DNS server instance but there's none in the DNSServer class. The class makes use of the heap while processing requests and only frees all that memory whenstop()is called, but that never happens inWiFiManagerunless I've missed something.@tablatronix commented on GitHub (Jun 10, 2018):
Hmm i made a note of this in dev branch because I suspected as much as these are smart pointers.
Would this be a bug in dnsserver? I mean it should clean itself up
@brianrho commented on GitHub (Jun 10, 2018):
I looked at the code and it seems it's been years since anyone made any actual change to its header, which I take to mean that the class's current state and behaviour suits most people just fine and the lack of a destructor isn't a big deal; they just have to call
stop()when they're done, which is common with Arduino libs anyways. All that's needed here is just adnsServer->stop()before thereset(), I think.