Redimming arrays
Blitz3D Forums/Blitz3D Beginners Area/Redimming arrays
| ||
If I redim an array at runtime, will it free the memory of the old array of the same name?? |
| ||
I would think so, although it's possible Blitz might wait until the program ends. You could try a test program that does a lot of redimming and watch the memory usage. Edit: I just tried this and the WinXP task manager showed memory usage going up and down slightly as the program did Dim a( Rand( 5000, 15000 ) ) a hundred times. |
| ||
Perhaps you want to take a look into this thread |
| ||
OK, so I take it that it does free the mem. I agree its not the best thing in the world to do and I usually avoid it, but it seems a good idea when I load a new tile map (2d array) ocassionally. Ta very much Tric!! :) |