On Dec 11, 8:35 pm, Jaume Bonet <jaume.bo...@gmail.com> wrote: <snip> > //Here we take the info coming from python and transform it > into a vector (will allow us to work with numbers instead of > // strings) and shareInt which is an array of sets (form > std::set) > vector<string> translator = string2int > (shareIntPy,root,shareInt,pSize,max);
I guess if there are any problems with Python/C API in your example they are in string2int function. How do you retrieve Python data from 'shareIntPy' Python object? If you have memory leaks you probably forget to Py_DECREF something retrieved with Python/C API functions that return new references (like PyObject_GetAttrString). Ivan -- http://mail.python.org/mailman/listinfo/python-list