#1283 Directors broken for smart pointer types

java (79)
Brant Kyser

Directors do not work for smart pointer types. I have attached a patch that adds a test case that demonstrates this issue.

There seems to be two issues that prevent this from working...

1) The boost shared pointer type maps changes the name of the swigCMemOwn member variable to swigCMemOwnBase, and the director code assumes the presents of the swigCMemOwn variable.

2) If one fixes the variable name from the first issue, a runtime failure occurs due to a dynamic cast failing and the result not being checked for null prior to use. The dynamic cast fails due to the cast assuming the pointer being passed into the function is the type of the director and the type is really a shared pointer to the director type.


  • William Fulton

    William Fulton - 2013-01-05

    Applied Brant's patch on Github for swig-2.0.10. Thanks.

  • William Fulton

    William Fulton - 2013-01-05
    • status: open --> closed
    • milestone: -->

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks