开发者

How to define typemap(in) and typemap(out) for const_iterator * in swig/python?

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜