If I do something like this,
byte  b = null;
b = new byte[var]
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.