Details
-
Bug
-
Status: Closed
-
Major
-
Resolution: Fixed
-
maxent-3.0.2-incubating
-
None
Description
So I noticed this bug because RealValueFileEventStream.main does not close the EventStream that it opens, leaving a new file open every time it is called.
I thought I could work around this by inlining the RealValueFileEventStream.main code, but it turns out that RealValueFileEventStream doesn't have a close method so there's nothing you can do. It's superclass, FileEventStream, opens up a FileInputStream, but doesn't expose that in any way.
So, as far as I can tell, there's no way to close one of these event streams.
I think the simplest solution would be to add a .close() method to FileEventStream (and have it implement java.io.Closeable). Then RealValueFileEventStream would inherit that method.