I have a whole list of C wrappers for OpenCV C++ functions like the one below. 
And all of them return a "new".  I can't change them because they are becoming 
part of OpenCV and it would make my library perfect to have a consistently 
updated skeleton to wrap around. My question is in this case how would one of 
you free these "new" memory allocators...When I run them in any kind of loop.  
It just eats up my ram, I end up having to restart my pc. Should I make a 
"delete" wrapper and use that. 

I've tried using foreign-free but I still have the same issue of having to 
restart. Any help is appreciated.


Mat* cv_create_Mat() {
    return new Mat();
}

Reply via email to