From: Kekoa V. <ke...@gm...> - 2014-06-30 20:40:25
|
I would be happy to see a response to this question as well, I asked a similar question previously on this list with no response: http://sourceforge.net/p/swig/mailman/message/32279158/ The only solution I was able to use for now was to not use shared_ptr in directors. Kekoa On Mon, Jun 30, 2014 at 2:24 PM, <rub...@te...> wrote: > Hi SWIGgers > > I'm wrapping a C++ class using directors to send an event when new data > has arrived. The class goes as follows: > > class listener { > virtual void onNewItem(std::shared_ptr<item>){throw > std::runtime_error("Not implemented");} > }; > > I'm overriding this class in Java using a director and I succesfully > receive the events and I can read the item class. Then I store them in an > arraylist, bur when I try to access them afterwards, the java jvm (openjdk > on Fedora AND Android, which is the target platform) segfaults upon > accessing the elements in the arraylist. I'm wrapping the shared ptr by > interfacing the operator->() in a template. > > Should I try std_shared_ptr.i here? More code available on request. > > Ruben > > ------------------------------------------------------------------------------ > Open source business process management suite built on Java and Eclipse > Turn processes into business applications with Bonita BPM Community Edition > Quickly connect people, data, and systems into organized workflows > Winner of BOSSIE, CODIE, OW2 and Gartner awards > http://p.sf.net/sfu/Bonitasoft > _______________________________________________ > Swig-user mailing list > Swi...@li... > https://lists.sourceforge.net/lists/listinfo/swig-user > |