Hello,
I work with swig. I have generated a mesh with python and have a c++
class with an pointer *. I handle the python Mesh with shared_ptr to the c++ class. Now I convert it by either doing mesh=&(*mesh_ptr) or by using the copy constructor.
Then I can print out the number of cells, which gives correctly 20000.
Now I call a function of my class. Printing out again the number of cells gives 0. The pointer is the same as before.
Does python delete the mesh?
How can I stop this? I need the mesh and do not want to hand it through every time.
Thanks for your help.