mathworks / libmexclass

libmexclass is a MATLAB framework which enables users to implement the functionality of MATLAB classes in terms of equivalent C++ classes using MEX.
BSD 3-Clause "New" or "Revised" License
5 stars 1 forks source link

libmexclass.proxy.Proxy does not inherit from handle #30

Closed kevingurney closed 1 year ago

kevingurney commented 1 year ago

To ensure that MATLAB Proxy instances have destruction and copying semantics which work as expected with corresponding C++ Proxy instances, libmexclass.proxy.Proxy should inherit from the MATLAB handle class.

There is already an implementation of the delete method for libmexclass.proxy.Proxy, which is supposed to delete an associated C++ Proxy instance when a MATLAB Proxy instance is cleared from the MATLAB workspace. However, this is never being called since libmexclass.proxy.Proxy isn't inheriting from handle.

This is related to #29 and the crash on MATLAB shutdown that is described in that issue.