Will clearing an array free the memory allocated?

moster67

Expert
Licensed User
Longtime User
Another quick question.

Will clearing an array free the memory allocated?

If I re-declare an array, setting it to zero, will the memory-space allocated by the array be freed as well? If it does, does this take place immediately?

The same goes for Agraham's Collection-library and using its extended methods for clearing an array: will the memory-space allocated by the array be freed as well?

I guess above depends CF.NET's memory-handling. Can anyone shed some light?

Thanks.

rgds,
moster67
 

agraham

Expert
Licensed User
Longtime User
You don't need to worry about freeing and reusing memory in .NET/Basic4ppc (unless you are writing libraries that interact with native resources). In managed code (C#, VB.NET, Basic4ppc) memory is entirely managed for you. Google for ".NET Garbage Collection", there are lots of articles out there but you don't actually need to know about this, just ignore the issue.
 

moster67

Expert
Licensed User
Longtime User
Thank you Agraham.

rgds
moster67
 
Top