In general, during compilation it is impossible to find out at what point in the program exactly the object stops referencing (so that the compiler can insert the “delete” instruction at that moment).
Java 6 14, Java ( , ), .
, , , "" - ; , . , , Java , , "", ( , ) - , .