Suppose I want to load information from a file (like I do when I require(“physics”)) and run a function or two from it that just returns key information (so that the file doesn’t stay in memory or exist in the main.lua file) and then after I’m done I want to release the file information from memory. How do I do it? So in other words, I want to have the program load a file, run a function contained in it ( a large function) and get some stuff, then close the file and remove its use from memory (I will not be returning to the file again and don’t want it chewing up memory).
Similarly, is there any good information on storing data into a file and then retrieving it later? I know it can be done and I haven’t looked up the information yet. Mostly I just hope this can also be treated the same way, or that I can store the information in some form and then just take it right back without any real effort.
(Note: if the second idea works easily, then I could just make the files this way and then it would be easier to load the data–which is basically what this idea is trying to do–load information not contained in the main file) [import]uid: 60706 topic_id: 10293 reply_id: 310293[/import]