From e21b182af2f5d3590740b30811b05335df9a93a9 Mon Sep 17 00:00:00 2001 From: Cristian Maglie Date: Thu, 17 Oct 2013 20:49:24 +0200 Subject: [PATCH] Removed destructor from File.cpp and SD.h as it leads to unexpected close/destructed objects #814 --- libraries/SD/File.cpp | 5 ----- libraries/SD/SD.h | 1 - 2 files changed, 6 deletions(-) diff --git a/libraries/SD/File.cpp b/libraries/SD/File.cpp index c3021d6b9..6eee39aa1 100644 --- a/libraries/SD/File.cpp +++ b/libraries/SD/File.cpp @@ -43,11 +43,6 @@ File::File(void) { //Serial.print("Created empty file object"); } -File::~File(void) { - close(); - // Serial.print("Deleted file object"); -} - // returns a pointer to the file name char *File::name(void) { return _name; diff --git a/libraries/SD/SD.h b/libraries/SD/SD.h index f21ec0f29..7435cf577 100644 --- a/libraries/SD/SD.h +++ b/libraries/SD/SD.h @@ -31,7 +31,6 @@ class File : public Stream { public: File(SdFile f, const char *name); // wraps an underlying SdFile File(void); // 'empty' constructor - ~File(void); // destructor virtual size_t write(uint8_t); virtual size_t write(const uint8_t *buf, size_t size); virtual int read();