Tiff class is leaking memory, how to solve that problem?

조회 수: 10 (최근 30일)
Jerome Lecoq
Jerome Lecoq 2014년 3월 1일
답변: Jerome Lecoq 2014년 3월 3일
Let's stay I have a tiff file with 200 directories.
I discovered that the tiff class in matlab is increasingly using memory so that :
T=Tiff(file,'r');
E=T.read();
for i=1:200
T.setDirectory(i);
E=T.read();
end
delete(T);
If I follow the memory usage (in R2013b both in win and mac), the memory increases a lot during the for loop as if the entire set of images were stored in memory, even if my code does not save all the images in memory.
When delete(T) is executed, memory is freed.
This is a BIG problem as I can't use the Tiff library to read large files, image one by one and be efficient about memory usage.
Am I doing anything wrong?

채택된 답변

Jerome Lecoq
Jerome Lecoq 2014년 3월 3일
It turns out that if you open the tiff in 'r+' mode. There is no buffering/memory leak. I am going to file a bug report on this.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 File Operations에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by