CxxWrap and finalizers for specific instances

I am using CxxWrap.jl and need to relinquish ownership for some particular instances, but not all, which is transferred to some other objects. CxxWrap has the possibility to disable the finalizer by adding the argument false to the class constructor wrapper. However this affects all objects for that class. The question is, whether there is a way to overwrite the finalizer for specific objects. I tried to define a dummy finalizer finalizer((x)->nothing, o) for them but it seems that the original finalizer defined by CxxWrap survives.

1 Like