| When using unbound arrays for more than one purpose in a script or when
you have instance, shared or global arrays you may want to clear out the current contents. There
are two ways to do this. One is to declare two arrays of the same type, do not use one of
the arrays. Whenever you need to clear out the first array just assign it to the second
unused array and PowerBuilder will free all the memory.
String ls_Array[], ls_Empty
ls_Array[1] = "Ken"
ls_Array[2] = "Howe"
...
...
ls_Array = ls_Empty // Clear out array
Or you could just redeclare the array using the same name.
ls_Array[]
ls_Array[1] = "Ken"
ls_Array[2] = "Howe"
...
...
String ls_Array[] // Clear out array
|