[BloodyMess] 1.5.3 ResourceSystem::closeArchive missing?

RedEyeCoder

11-05-2009 04:48:46

The function ResourceSystem::closeArchive is declared but not defined in BloodyMess 1.5.3. I assume there are plans to include this in a later release :lol:

In the mean time is there an alternative way to unload resources?

betajaen

11-05-2009 09:28:50

Your right, it isn't implemented.

However, Archives use almost nothing in memory and File (assuming your using file) doesn't pre-scan or pre-load anything, unlike Ogre. So it's presence is almost nil. Once you close a resource, it's deleted from the archive anyway, so it's harmless to keep it open during the entire life of your application.

RedEyeCoder

12-05-2009 01:44:49

Excellent thanks for the quick reply. I was scared it was going to be a massive memory leak, glad to see I can ignore it for now.

RedEyeCoder

12-05-2009 02:11:32

I have been looking further into this and I cannot see an easy way to close a resource via the Archive/ResourceSystem interfaces? The only real solution I can see, without modifying NxOgre, is to store the Archive and Resources seperately to NxOgre and manually destroy them myself.

What I was expecting was something like;
ResourceSystem::getArchive(name)
Archive::getResource(name)

And then use the existing Archive::close(resource) to clean things up.
I will leave this for incase I have missing something really obvious :oops:

Looking foreword to your reply :)