How to clear a module from memory?

Hi,

I created a data library and am using it successfully. However, when I get to the gameover screen, and try to clear the data, it sticks around because I’m using require( ) to bring it in.

It seems like the benefits of require( ) are working against me here. Since it’s already read the file and performed the initial tasks, it won’t do them again unless the app is restarted.

Is there some obvious way to do this that I’m overlooking?

Thanks,

Matt
W2MD [import]uid: 10211 topic_id: 23770 reply_id: 323770[/import]

Hey Matt,

You use Spriteloq’s API right? If so there’s a function in loq_util called unrequire you can use. http://www.loqheart.com/spriteloq/apidocs/files/loq_util-lua.html#unrequire

http://www.loqheart.com/spriteloq/apidocs/files/loq_util-lua.html#Unloading_modules_from_application_memory_with_unrequire

I use it to unload levels which are modules in Cannon Cat. [import]uid: 27183 topic_id: 23770 reply_id: 95652[/import]

Don,

You are the man. I had the tools and didn’t even know it.

Thanks,

Matt
W2MD [import]uid: 10211 topic_id: 23770 reply_id: 95755[/import]

:slight_smile: Good luck [import]uid: 27183 topic_id: 23770 reply_id: 95759[/import]