grasph/wrapit

Need to wrap object destructors

Opened this issue · 1 comments

In same C++ libraries the API may return a pointer to an object for which the user has the responsibility to delete it. This is not possible with the generated wrapper since the destructor is not wrapped. This can be easily done by adding a method delete for each wrapped class.

 mod.method("delete", [] (MyClass* ptr) { delete ptr; } );

Meanwhile I have added by hand the destructors I needed. But it would be nice if this could be added in subsequent releases.