mIRC Homepage

Closing hash tables and dlls

Posted By: Thels

Closing hash tables and dlls - 25/09/10 04:36 PM

When you close mIRC, does it close all the hash tables and .dlls? Or do those stay loaded?

I close hash tables when I don't need them anymore, but some hash tables I always need as long as mIRC's open. I'm not using any .dlls, but I'm planning to use spaces.dll, which will be used so often that closing it while mIRC is running is pointless.

But should I make sure to close all hash tables and dlls on exit, or will mIRC do that?
Posted By: DJ_Sol

Re: Closing hash tables and dlls - 25/09/10 05:42 PM

You need to use the command /hsave to save your hash tables before they close. Then use /hload when you want to start them.
Posted By: RusselB

Re: Closing hash tables and dlls - 26/09/10 01:29 AM

Hash tables, similar to files on your hard drive, are only "opened" (not technically the correct term for hash tables), when you actually access them using commands like /hadd, /hinc, /hdec, $hget, $hfind, etc.
The tables are stored in RAM from the time they are created with /hmake or /hadd -m
They stay in RAM until you close mIRC or use the /hfree command.

As stated, you can (and usually should), use the /hsave command to save the information from your hash table to a file on your hard drive.

DLL's, on the other hand, if I recall correctly (don't use them much myself), stay loaded until they are unloaded via a command to the DLL. See
Quote:
/help DLL Support
for more details.
Posted By: Thels

Re: Closing hash tables and dlls - 03/10/10 09:37 AM

Yeah, I of course save the hash tables that are worth saving (some have read only data, and some have temporary variables that will be reinitialized next time mIRC starts, so they're not worth saving).

The question was if they kept occupying space after mIRC closes down, or if mIRC closes them on shutdown.

I guess I'll just play it safe and close all hash tables and dlls on exit.
Posted By: qwerty

Re: Closing hash tables and dlls - 03/10/10 12:37 PM

Originally Posted By: Thels
The question was if they kept occupying space after mIRC closes down, or if mIRC closes them on shutdown.
When mirc closes down, all memory associated with it is freed by Windows, if not by mirc itself. There is no need for any sort of cleanup on your part.
Posted By: MeStinkBAD

Re: Closing hash tables and dlls - 07/10/10 10:34 PM

Originally Posted By: qwerty
Originally Posted By: Thels
The question was if they kept occupying space after mIRC closes down, or if mIRC closes them on shutdown.
When mirc closes down, all memory associated with it is freed by Windows, if not by mirc itself. There is no need for any sort of cleanup on your part.


This is like saying "just pull the plug on the computer at anytime when you are done using it, all the memory will be freed when power is lost"
Posted By: Riamus2

Re: Closing hash tables and dlls - 08/10/10 12:00 AM

Not quite. Letting Windows/mIRC close memory related items such as hash tables by itself when exiting mIRC is going to "safely" close everything. Cutting power from the computer while it's running doesn't allow anything a chance to "safely" close stuff down. There's a pretty significant difference there.
© 2022 mIRC Discussion Forums