okay, I'm a bit sick to read all the posts but freeing of what I wrote earlier is:
int i;
for (i=0;i<1000;i++) // ###
{
sys_free( Bwater[i] );
}
sys_free(Bwater);
Bwater = NULL;
the last line is only needed if you plan to use again Bwater
the 100 in memset is an example value, I copied it from my existing code, where my default value is 100. I use similar arrays and srtuct arrays and array structs and arrayarraystructssctrucscscs

extensively.