Page 1 of 1
How to release array memory?
Posted: Sat Jan 17, 2009 4:17 pm
by laborde
PureBasic Help says the following, "To delete the content of an array and release its used memory during program flow, call Dim with array name and 0 elements." Does this work, and if so, what is the format? I can't seem to get it to work
Posted: Sat Jan 17, 2009 4:27 pm
by Kaeru Gaman
it does work, but the first element stays callable, only loses its value.
dunno if it's handeled like a single variable then.
Code: Select all
EnableExplicit
Dim a(100)
a(0) = 50
Debug a(0)
Dim a(0)
Debug a(0)
Posted: Sat Jan 17, 2009 4:51 pm
by laborde
Thanks for the response! My first introduction to EnableExplicit.