E
Egor Yu. Shkerin
Hello.
Please tell me how can I grow size of arrays?
Now I do something like that:
sbyte [] a = new sbyte[ 1 ];
for( int i = 2; i < 10; i++ )
{
sbyte [] new_a = new sbyte[ i ];
a = new_a;
}
But I fill that it will be memory leak.
How can I free memory taken with "a" variable?
Or maybe I do something stupid? Then please let me know how should I realloc buffer.
Please tell me how can I grow size of arrays?
Now I do something like that:
sbyte [] a = new sbyte[ 1 ];
for( int i = 2; i < 10; i++ )
{
sbyte [] new_a = new sbyte[ i ];
a = new_a;
}
But I fill that it will be memory leak.
How can I free memory taken with "a" variable?
Or maybe I do something stupid? Then please let me know how should I realloc buffer.