My question is.Will the temp variable will be set to null,so it is going to be de-allocated after the termination of the function?
NothingHere is a class.voidPositionList is a list.
private final void initVoidPositions() { NothingHere temp = new NothingHere("Road"); voidPositionList.add(temp); }