[RESOLVED] Done with matrix, how to clean it from memory
I have a loop that dims a 20,20 integer array. That loop will be executed ~1000 times.
At the end of each loop, would it be necessary for me to free the matrix from memory or such? With a recordset I have the habit of closing it and setting it to nothing to free up memory it has taken.
Or will "Dim MatriceMask() As Integer" (at the beginning of each loop) free up the old matrix?
Thanks for any info
Re: Done with matrix, how to clean it from memory
It should just overwrite the existing memory with the new data... that's what the loop tells it to do. I don't think there are any real memory issues with just looping again without doing anything to it.
Re: Done with matrix, how to clean it from memory
Something I forgot to specify is that this matrix starts (0,0) all the time. It actually gets redimmed to grow to 20,20 (or 25,25 or 20,25 - you get the drift).
If that still shouldn't present memory issue, I'll keep it as it.
thanks for your quick reply.
Re: Done with matrix, how to clean it from memory
Erase MatrixMask
Will free the memory currently allocated..
Re: Done with matrix, how to clean it from memory
Re: [RESOLVED] Done with matrix, how to clean it from memory
You can also use Redim statement
Redim MatrixMask(0,0)
Re: [RESOLVED] Done with matrix, how to clean it from memory
Oh - that's what I was doing before I knew about the "Erase" command.
Good to know.