Re: memory issue



"Tom Esh" <tjeshGibberish@xxxxxxxxxx> wrote in message
news:d7h6c1d7co94amnbu3fjakrl6ghul410p1@xxxxxxxxxx
> VB loads the library dll the first time you call one of it's declared

Hey Ben,

Try this sample. Extract the files to a directory and double click
project1.vbp in the debug directory and then push f5 to run the project.
Push the "SomeFunction" button with task manager open and you'll see the dll
load into memory and allocate 128MB of ram. If you hit it again it won't
allocated any more ram so hit it as many times as you like. Then push
LoadLib and then FreeLib twice and you'll see the memory go back down as the
dll is unloaded. At this stage if you hit the SomeFunction button again vb
will crash. But all you've got to do to get around that is push LoadLib
again.

http://mikesdriveway.com/misc/TestLoadLib.zip

Michael


.