Arduino TFT library problem

It seems that the problem is that the file resource created when calling loadImage is never released. Then after call several times to TFT.loadImage it goes out of resources to create more PImage/File objects.

The solution that I found is to create a close() method in the PImage class to close the file after draw it. I added this code in the public section of the class PImage (PImage.h):

class PImage {
public:
PImage() :
_valid(false),
_bmpWidth(0),
_bmpHeight(0) { }

void draw(Adafruit_GFX & glcd, int16_t x, int16_t y);

static PImage loadImage(const char * fileName);

bool isValid() { return _valid; }

int width() { return _bmpWidth; }
int height() { return _bmpHeight; }

void close() {_bmpFile.close(); }

and I call this method after drawing the image, as in this example:

logo = TFTscreen.loadImage("TEST.BMP");
TFTscreen.image(logo, 2, 2);
logo.close();

With this change it seems it is working ok. Anyway I expect for the official fix of this issue.

Regards,
Fran