Skip to content

memory leak in SD library - IDE 1.0 [imported] #814

Closed
@cmaglie

Description

@cmaglie

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");
}

Metadata

Metadata

Assignees

Labels

Library: SDThe SD Arduino library

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions