Skip to content

Commit 88f7504

Browse files
author
Federico Fissore
committed
Removed destructor from File.cpp and SD.h as it leads to unexpected close/destructed objects #814
1 parent e8834d3 commit 88f7504

File tree

3 files changed

+1
-6
lines changed

3 files changed

+1
-6
lines changed

build/shared/revisions.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ ARDUINO 1.5.5 BETA
1919
* avr: Fixed wrong extended fuses on Arduino Yún when using external programmer
2020
* avr: Added yun variant with LED_BUILTIN definition
2121
* avr: Refactored Mega* variants definitions in boards.txt (Kristian Sloth Lauszus)
22+
* avr: Removed File object destructor. In order to free memory allocated by a File object the safest way is to call its close() method
2223

2324
ARDUINO 1.5.4 BETA 2013.09.10
2425

libraries/SD/src/File.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,6 @@ File::File(void) {
4343
//Serial.print("Created empty file object");
4444
}
4545

46-
File::~File(void) {
47-
close();
48-
// Serial.print("Deleted file object");
49-
}
50-
5146
// returns a pointer to the file name
5247
char *File::name(void) {
5348
return _name;

libraries/SD/src/SD.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,6 @@ class File : public Stream {
3131
public:
3232
File(SdFile f, const char *name); // wraps an underlying SdFile
3333
File(void); // 'empty' constructor
34-
~File(void); // destructor
3534
virtual size_t write(uint8_t);
3635
virtual size_t write(const uint8_t *buf, size_t size);
3736
virtual int read();

0 commit comments

Comments
 (0)