[gnoduino] Fix for #814, Memory Leak



commit 3ad7c796a8cd5d8fc5647d10f0eae18c457e92ae
Author: bjelojac <walkingdead gmail com>
Date:   Thu Apr 25 13:46:43 2013 -0500

    Fix for #814, Memory Leak
    
    File isn't closed before being released, it leaks. This test has been verified and tested many times.

 libraries/SD/File.cpp |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)
---
diff --git a/libraries/SD/File.cpp b/libraries/SD/File.cpp
index 88d9e9a..c3021d6 100644
--- a/libraries/SD/File.cpp
+++ b/libraries/SD/File.cpp
@@ -44,6 +44,7 @@ File::File(void) {
 }
 
 File::~File(void) {
+ close();
   //  Serial.print("Deleted file object");
 }
 


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]