From: <rub...@te...> - 2014-07-01 07:48:24
|
I'm glad I'm not the only one with this problem. What would it take to implement the support for shared_ptr in directors? (I'm refering to the email in the link mentioned below). I CC'd the devel mailing list. If anyone could guide me a little it the process, I'd be glad to implement it. Ruben Am Mon Jun 30 2014 22:40:18 GMT+0200 (CEST) schrieb Kekoa Vincent: > 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 > > > |