igorcoroli / javacv

Automatically exported from code.google.com/p/javacv
GNU General Public License v2.0
0 stars 0 forks source link

Memory Leak ? #258

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
suppose I have 1000 images named 1.jpg - 1000.jpg
run the simple program :
public static void main(String[] args) {
   for(int i=1;i<1001;++i) {
       BufferedImage b = ImageIO.read(new File(i+".jpg"));
       IplImage im = IplImage.createFrom(b);
   }
}

What is the expected output? What do you see instead?
I except to see garbage collected. instead I see the heap keep increasing and 
Increasing.

What version of the product are you using? On what operating system?
windows 7 , java 1.6 ,  opencv 2.31 javacv 20120108 

Please provide any additional information below.

Original issue reported on code.google.com by Avi.Sho....@gmail.com on 22 Nov 2012 at 12:20

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
Can you also try to call `System.gc()`? thanks

Original comment by samuel.a...@gmail.com on 22 Nov 2012 at 3:11

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
So, the problem is ImageIO? Can you try with cvLoadImage()/cvReleaseImage() 
instead of ImageIO?

Original comment by samuel.a...@gmail.com on 22 Nov 2012 at 3:33

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
What behavior? If ImageIO is the problem, this has nothing to do with JavaCV. 
What happens if you ImageIO.read() and don't call IplImage.createFrom()?

Original comment by samuel.a...@gmail.com on 22 Nov 2012 at 3:39

GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
[deleted comment]
GoogleCodeExporter commented 8 years ago
So it's a problem with ImageIO it seems. You'll have to ask the author of that 
library

Original comment by samuel.a...@gmail.com on 23 Nov 2012 at 1:01