|
Re: Memory Leak in Camera Code
For efficiency, all the images in Java are stored as opaque C data structures and have to be explicitly freed. I know you said that you are calling free() in your code, can you make sure that all the intermediate images are also freed?
If it turns out that you are doing that, maybe you could start cutting out some of the vision primitives to see which one is leaking the memory. You could do this by just commenting the code and rechecking. It won't work since the program is getting chopped up, but you can test for the leak.
It's possible that there is a bug in one of the methods and the library is leaking somewhere. This would help isolate that, and we can patch it for you.
Thanks,
Brad
__________________
Brad Miller
Robotics Resource Center
Worcester Polytechnic Institute
|