>This is exactly the right way to do things in Java. In Java, you >can open hundreds of files, and never trigger any gc, since each >file object is very small. Unless you explicit close file, you >will be dead very quickly.
Although your point is taken, I think in this case it is the programmer who is at fault. Any programmer who opens hundreds of files hoping for GC to take over is asking for it, in any language. >This is one of the reason Java is so sloppy. Everyone relies on language >feature to do their job, but it is impossible for JVM to know there I think it is the programmer who is sloppy. Java just encourages it, IMO. -Melvin