Closed
Description
This is Issue 814 moved from a Google Code project.
Added by 2012-02-12T11:08:47.000Z by rob.till...@gmail.com.
Please review that bug for more context and additional comments, but update this bug.
Original labels: Type-Defect, Priority-Medium
Original description
JGoulder reported:
When a file is opened a malloc() is performed to get memory. When a file is closed the memory is freed. If the file object is destroyed before the file is closed, the memory is never freed.
Existing code:
File::~File(void) {
// Serial.print("Deleted file object");
}
JGoulder also proposed a fix:
File::~File(void) {
close();
// Serial.print("Deleted file object");
}