diff engine/core/util/resource/resource.i @ 148:72c25cc27d8b

For your convenience pools now have a function called purgeLoadedResources exposed to python which will delete all loaded resources that have a ref count of zero. You can use this after closing a map or something alike. It may however impact performance, as the next map may very well reload the same resources. Just be aware of that. :-)
author phoku@33b003aa-7bff-0310-803a-e67f0ece8222
date Sat, 11 Oct 2008 06:05:11 +0000
parents 2cc01d9433ab
children 6e7d228def30
line wrap: on
line diff
--- a/engine/core/util/resource/resource.i	Thu Oct 09 13:36:13 2008 +0000
+++ b/engine/core/util/resource/resource.i	Sat Oct 11 06:05:11 2008 +0000
@@ -86,6 +86,7 @@
 		virtual int addResourceFromFile(const std::string& filename);
 		virtual int addResourceFromLocation(const ResourceLocation& loc);
 		virtual int getResourceCount(int status);
+		virtual int purgeLoadedResources();
 		virtual void addResourceLoader(ResourceLoader* loader);
 		virtual void release(unsigned int index, bool dec = false);
 		virtual unsigned int getIndex(const std::string& filename);