I am trying to use SWIG to expose interfaces to a C++ library in an android Java project.
My library comes with a lot of classes, some of which are callback or listeners. So I began using swig directors. It worked fine untill my examples got more complex. But now almost every time a java class instance extending a director class gets garbage collected, the Swig::Director::swig_disconnect_director_self(char const*) method crashes in call to GetObjectClass.
I have found a workaround which consists in calling swigReleaseOwnership on callback subclasses, but I bet this will result in memory leaks right ?
Is there a known solution to this issue ?
Thanks for the help