Hi,
If I do something like this,
int var;
byte [] b = null;
while(1){
read var;
b = new byte[var]
//process b
}
will the program ever run out of memory. Will it create a new location everytime, the new stmt is executed. Will the old location be out of scope and dumped or stays hanging there without being used as long as the program doesn't exit
The code is from java, but I want the concept clear.I did not show the full code, it assumes that while exits when program is shut down using ctrl-c or likewise.
Thanks ,
Future member.