Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
Drexel University or The Math Forum.
|
|
|
|
Re: Memory leak in file DELETE in R2010b?
Posted:
Sep 4, 2012 3:43 PM
|
|
Hi Byron,
Thank you very much for posting your work-around to this thread. I know nothing about Java and so I will never be able to find this work-around.
I am just wondering why Mathworks have not fixed this problem.
Kevin
"Byron" wrote in message <k0rtvm$6kc$1@newscl01ah.mathworks.com>... > "Kevin" wrote in message <in5he5$641$1@fred.mathworks.com>... > > I think the solution is to use DOS to do the delete: > > > > dos('del file2.mat'); > > > > This will be the workaround. > > > > Is Java being the problem here? > > > I was reading in a few hundred thousand binary files from a frame grabber and deleting them on the fly with delete(?path\fname?). at around 760k files i got java heap space, out of memory error. > I solved the problem by switching to java.io.File(?path\fname?).delete(), which maintains same speed but no memory leak issues. I tried system(?del path\fname?) but it was 20x slower. > > Just though i?d share incase anyone else needed a faster workaround than the system cmd.
|
|
|
|