jblas-project / jblas

Linear Algebra for Java
http://jblas.org
BSD 3-Clause "New" or "Revised" License
590 stars 149 forks source link

"Too many open files" #23

Closed moustaki closed 11 years ago

moustaki commented 11 years ago

Hello!

I just stumbled on a 'too many open files' error when saving a large amount of DoubleMatrix to disk. It is looking like the output and input streams are never closed.

public void save(String filename) throws IOException {
    DataOutputStream dos = new DataOutputStream(new FileOutputStream(filename, false));
    this.out(dos);
}

public void load(String filename) throws IOException {
    DataInputStream dis = new DataInputStream(new FileInputStream(filename));
    this.in(dis);
}

Best, Yves

mikiobraun commented 11 years ago

Hi Yves,

yes, I think you're right.

I just pushed the fix.

-M

mikiobraun commented 11 years ago

Seems to work now, closing this issue.