It's all about the garbage collector: The CLR releases object memory on a
low priority thread, or when it detects the system needs resources.
Just have patience and the memory will be recovered.
Of course if you're like me and you have very little patience, you can call
System.GC.Collect() which will force the garbage collection, although you'll
take a performance hit.
Regards,
Ben
"NetMasker" <ne*******@yahoo.com> wrote in message
news:O%****************@TK2MSFTNGP15.phx.gbl...
I used the following command to keep ~50Mbytes for a buffer:
Dim inBuf(50000000) As Byte
I used the buffer and now I want to release the 50Mbytes of memory that my
buffer used.
Is there any way to clear the buffer ???
I tried with the following but nothing happend:
Array.Clear(inBuf, 0, 50000000)
inBuf = Nothing
Thanks in advance