Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Emgu CV - memory-leaks (memory consumption)

I am using EmguCV, the OpenCV wrapper for .NET. I am disposing all created objects but my app is still using more and more memory (in release configuration too). I have debugged my app using .NET Memory profiler and get this result:

http://img532.imageshack.us/img532/2503/screenqv.png

all objects instance count is oscilating but GChandle instance counr is increasing until my machine is unusable. Garbage collector does not release memory (i think).

I am using VS 2008 professional, Win7 prof 32-bit, both up to date, and last stable version of emguCV.

I can post some app code, if it will help.

Thanks and sorry for my English. Martin

like image 577
Martin Pilch Avatar asked May 16 '10 09:05

Martin Pilch


1 Answers

Have a look at the link below on how to do Automatic Garbage Collection.
http://www.emgu.com/wiki/index.php/Working_with_Images
I had a similar problem and I started to improve my code using the different guidelines on the link above.
Regards
Shivam

like image 112
Shivam Avatar answered Oct 16 '22 02:10

Shivam