[cffi-devel] New and delete pertaining C wrapper for C++ code

Joeish W joeish80829 at yahoo.com
Sat Mar 22 20:20:25 UTC 2014


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();
}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.common-lisp.net/pipermail/cffi-devel/attachments/20140322/c35a1552/attachment.html>


More information about the cffi-devel mailing list