I am in the process of developing an SFunction and compiled submodel in Simulink, an SFunction that calls into a DLL compiled using Realtime Workshop. The problem is, once I compile the submodel once, execute it in native Simulink through the SFunction and the model finishes, MATLAB still keeps a handle to the submodel DLL. I cannot recompile the DLL until MATLAB is restarted, forcing the release of the DLL.
I have even gone so far as to see if ProcessExplorer could force closed the handle but it can't.