开发者

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

开发者 https://www.devze.com 2023-04-06 23:03 出处:网络
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:

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

精彩评论

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