mIRC Home    About    Download    Register    News    Help

Print Thread
#89748 09/07/04 04:50 AM
Joined: Apr 2004
Posts: 66
C
Cyrex Offline OP
Babel fish
OP Offline
Babel fish
C
Joined: Apr 2004
Posts: 66
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?

#89749 09/07/04 05:57 AM
Joined: Dec 2002
Posts: 1,922
O
Hoopy frood
Offline
Hoopy frood
O
Joined: Dec 2002
Posts: 1,922
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)


Link Copied to Clipboard