xuanaux / cvblob

Automatically exported from code.google.com/p/cvblob
GNU Lesser General Public License v3.0
0 stars 0 forks source link

Memory not deallocated? #5

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
Hi Grendel,
just a question.
I am using repeatedly the following functions
cvLabel/cvFilter/cvGreaterBlob

Is it possible that one of them dinamically allocate some structure and do
not free them?

When I commented above piece of code, I finally found the application
memory stable and it didnt increased.

Can you please have a look? It is very important for me.
Thanks a lot!

Original issue reported on code.google.com by daniele....@gmail.com on 11 Mar 2009 at 4:49

GoogleCodeExporter commented 8 years ago
I used Valgrind with my code and it was ok, but I'll check it again because 
there is 
new code (I don't remember exactly when I debug it).

Thanks for the report!

Original comment by grendel....@gmail.com on 12 Mar 2009 at 4:46

GoogleCodeExporter commented 8 years ago

Original comment by grendel....@gmail.com on 12 Mar 2009 at 4:47

GoogleCodeExporter commented 8 years ago
Hi Grendel,
I checked again the code using a leakage detector like Valgrind,
it warns me about the function cvLabel.

Just to be sure, I checked both my program and the test one attached to the lib.
The leakage size is always 156 bytes and always is referred to a call to 
cvLabel.
Hope this can help!

Original comment by daniele....@gmail.com on 13 Mar 2009 at 7:32

GoogleCodeExporter commented 8 years ago
Sure! It's help a lot.

The problem was that the blobs structure doesn't free properly. Now is fixed in 
version 0.9.8.

There are a new function: cvReleaseBlobs. It's used in cvLabel function. Also, 
you 
must call it explicitly when you don't need the structure any more (see 
"test.cpp").

I have used Valgrind once angain and it seems there isn't any leak now.

Thank you very much for your help!

Original comment by grendel....@gmail.com on 13 Mar 2009 at 8:57

GoogleCodeExporter commented 8 years ago
Great Grendel!!!!
Thanks a lot!!!!

Original comment by daniele....@gmail.com on 13 Mar 2009 at 9:12