(no subject)
Mar. 14th, 2006 11:00 amToday's discovery: Java will not flush file streams for you. If you open a BufferedWriter, write some stuff to it, and then don't call close() on it, then Java will happily throw the remains of the buffer away.
This is probably related to the lack of destructors in Java, and the complete and utter uselessness of Object.finalize() - the method that's like a destructor, except it only gets called if the garbage collector runs, and then only if the garbage collector feels like it.
This is probably related to the lack of destructors in Java, and the complete and utter uselessness of Object.finalize() - the method that's like a destructor, except it only gets called if the garbage collector runs, and then only if the garbage collector feels like it.
no subject
Date: 2006-03-15 12:00 pm (UTC)I can tell Java to run the garbage collector (System.gc()), but again this only suggests to the VM that garbage collection might be a good idea.