I'd like to let swig know about the type of my const_iterato开发者_StackOverflowrs so that it can GC them and get rid of this error:
swig/python detected a memory leak of type 'MyClass::const_iterator *', no destructor found
I can't really figure out how I'm supposed to go from python to C++ and then back using the typemap(in) and typemap(out) directives. I can use these objects fine inside of python, but I guess I'm missing something essential about pointers swig and the C-API.
精彩评论