.cfg file question
Moderators: POL Developer, Distro Developer
.cfg file question
When I read a cfg file (using ReadConfigFile(filename)) do I have to unload this .cfg file??? Or is it unloaded automaticly when script ends (or exits by return)???
If you only need a config file once then unload it.
If you write to a config file you must unload it to have it updated in memory.
Most the time you don't want to unload a config file because it will have to be removed/reread.
The config file on the first use is parsed and stored in memory.
Every time after that, it is retrieved from memory for speed.
If you call UnloadConfigFile() then the next time ReadConfigFile() is used, the file must be read from disk and parsed back into memory.
If you write to a config file you must unload it to have it updated in memory.
Most the time you don't want to unload a config file because it will have to be removed/reread.
The config file on the first use is parsed and stored in memory.
Every time after that, it is retrieved from memory for speed.
If you call UnloadConfigFile() then the next time ReadConfigFile() is used, the file must be read from disk and parsed back into memory.