Hi,
I know slicing, because I've used it in my project.
What I wanted to know:
Does slicing just create a new array and copy the contents of all indexes from the old array to the new array, and dereference the old array, so it can be flushed at the next FlushMem,
or
does the slicing just resize the allocated memory for the array (so it appears that the array has been resized)?
I ran a small testprogram and it appears that it's the first option.
Just asking to be sure.
I wanted this to know, because I wanted to start with 3D-graphics (and models), but there's no 3D-module yet.
So I could convert my code (for loading data into memory from a datafile) to B3D code and the loading routines use slicing.
I know slicing, because I've used it in my project.
What I wanted to know:
Does slicing just create a new array and copy the contents of all indexes from the old array to the new array, and dereference the old array, so it can be flushed at the next FlushMem,
or
does the slicing just resize the allocated memory for the array (so it appears that the array has been resized)?
I ran a small testprogram and it appears that it's the first option.
Just asking to be sure.
Local test[] FlushMem Print MemAlloced() test = test[..1000] Print MemAlloced() FlushMem Print MemAlloced() test = test[..2000] Print MemAlloced() FlushMem Print MemAlloced()
I wanted this to know, because I wanted to start with 3D-graphics (and models), but there's no 3D-module yet.
So I could convert my code (for loading data into memory from a datafile) to B3D code and the loading routines use slicing.