mIRC Homepage
Posted By: Cyrex Hash Tables - 09/07/04 04:50 AM
I am writing a script that utilizes hash tables. I was wondering if leaving a hash table open without using it is using system resources. Would it be best to just have my script close an unused hash table and recreate it when it needs to use one?
Posted By: Online Re: Hash Tables - 09/07/04 05:57 AM
Like variables, hash tables are kept in the memory while mIRC is running. Unlike variables, hash tables are not saved and reloaded automatically.

If your tables are small and mainly used for configuration settings, don't worry about leaving them in the background (they weigh nearly nothing in terms of today's RAM). But if they act as large memory buffers, be sure to /hdel unused items or /hfree the whole table as much as possible.

As a side note, /hsave and /hload are instantaneous, but they will be considerably slower if you use them on INI files (-i command switch)
© mIRC Discussion Forums