Ask Your Question
0

this is lead to memory leak?

asked 2015-01-08 05:54:12 -0600

Abu Gaseem gravatar image

I hope if some one can answer my question and clarify the details .

IplImage* out;
out = doPyrDown( in, IPL_GAUSSIAN_5x5 );
out = doPyrDown( out, IPL_GAUSSIAN_5x5 );
out = doCanny( out, 10, 100, 3 );
 // do whatever with ‘out’
//
...
cvReleaseImage ( &out );

I read in Learning opencv this is not a problem . how is it fine ?! every method doPyrnDown & doCanny allocate Image and return the address of the Image (it's pointer) . I know that this situation lead to memory leaks . if not i think the IplImage structure has a list of addresses dynamically updated during run-time of the program .

edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
2

answered 2015-01-08 06:17:27 -0600

IplImage and the rest of the c-Api is deprecated for years! So please use the C++Interface and check if the problem still exists.

edit flag offensive delete link more

Comments

ok I will do with you tips thanks bro, the problem that's no free books or tutorial for c++

Abu Gaseem gravatar imageAbu Gaseem ( 2015-01-08 06:42:43 -0600 )edit
2

keep reading the book, just use the code from https://github.com/Itseez/opencv_extr... then.

berak gravatar imageberak ( 2015-01-08 06:53:16 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2015-01-08 05:54:12 -0600

Seen: 391 times

Last updated: Jan 08 '15