-
Notifications
You must be signed in to change notification settings - Fork 7.6k
SD begin() end() memory leak #2897
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
still |
@cybercatnet can you try updating this block to:
adding the free line. @me-no-dev fyi, the card->base_path is being leaked... |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
Seeing the same issue. Similar use case i.e. need to support removing / inserting SD card run time. Observing 20 bytes leaking as well. |
[STALE_CLR] This issue has been removed from the stale queue. Please ensure activity to keep it openin the future. |
by the way, yes - this change fixes the issue |
[STALE_SET] This issue has been automatically marked as stale because it has not had recent activity. It will be closed in 14 days if no further activity occurs. Thank you for your contributions. |
[STALE_DEL] This stale issue has been automatically closed. Thank you for your contributions. |
Just an FYI, this leak still happens 1.0.6 and this fix doesn't seem to be incorporated. I manually applied the fix and it appears to resolve the issue for me as well. |
@SuGlider can we close this properly? |
Yeah, we can close it, as it was fixed by #5419 |
Hardware:
Board: ESP32 Dev Module DOIT
Core Installation version: 1.0.1
IDE name: Arduino IDE and Platform.io
Flash Frequency: 80Mhz
PSRAM enabled: no
Upload Speed: 115200
Computer OS: Windows 10
Description:
In my program i have memory leak and i made a simple test.
SD.end() doesnt free all of his heap memory.
My program needs to check if the sd card is connected before touch files, and if is not i need to SD.begin() again in the case of the sd card is again connected.
Sketch:
#include <SPI.h>
#include <SD.h>
void setup() {
Serial.begin(9600);
}
void loop() {
SD.begin(5);
Serial.println((unsigned long)ESP.getFreeHeap());
SD.end();
delay(1000);
}
ESP.getFreeHeap:
249644
249624
249604
249584
249564
249544
249524
249504
249484
249464
249444
249424
249404
249384
249364
249344
249324
249304
249284
249264
249244
249224
The text was updated successfully, but these errors were encountered: