My code is this:
function system.Unload()
print(application:getTextureMemoryUsage());
collectgarbage("collect");
collectgarbage("collect");
print(application:getTextureMemoryUsage());
logoWav = nil;
logoBmp = nil;
logoTexture = nil;
collectgarbage("collect");
collectgarbage("collect");
collectgarbage("collect");
collectgarbage("collect");
collectgarbage("collect");
collectgarbage("collect");
collectgarbage("collect");
collectgarbage("collect");
collectgarbage("collect");
collectgarbage("collect");
collectgarbage("collect");
print(application:getTextureMemoryUsage());
end
And the result is:
8192
8192
8192
How I force the unload of a texture?
Comments
Are you sure the variables you are nilling are available in the scope of the Unload function?
Here is a quick test:
It must be GC issues.