Free memory questions

Ok, a couple of good points there, so what you’re saying is that if I declare an array of size [100] then 100 bytes will be allocated to it (and hence un-available to anything else) even if only a few characters of the string are used?

I assume that memory is only allocated when that particular array/object is within scope? So in my example since all of the string are within scope all of the time the amount of free memory remains the same?

Finally, Any idea why the two functions give such different values?

thanks