tags:

views:

49

answers:

1

Hi!

I have a problem with javaCV:

CvMemStorage storage = CvMemStorage.create();

CvSeq lines = cvHoughLines2( houghInputImage, storage.getPointer(),
     cv.CV_HOUGH_PROBABILISTIC, rho, Math.PI/theta, threshold, param1, param2 );

// ...

storage.release();

This code doesn't release the memory. Used memory groving until my laptop die. If I comment out the cvHoughLines2 line then there is no problem, used memory doesn't groving.

Can you help me why it's happening? What do I wrong?

My environment: XP Home, OpenCV 2.1, JavaCV20100730, JRE6.

A: 

Storage handling is working correctly in OpenCV so may be the problem can be found in JavaCV.

I assume that you call the code above in a loop. You should try to move the storage creation and release outside the loop and you may only loose memory at the end of the run.

rics