Session currently has no destructor, because we cannot terminate the neuron process while inprocess:
>> neuronConfig = clibConfiguration("neuron")
neuronConfig =
CLibraryConfiguration for neuron with properties:
InterfaceLibraryPath: "Z:\Git\matlabneuron\neuron\neuronInterface.dll"
Libraries: ["Z:\Git\matlabneuron\source\libnrniv.a" "C:\Program Files\MATLAB\R2023b\extern\lib\win64\mingw64\libmex.lib"]
Loaded: 1
ExecutionMode: inprocess
ProcessID: 4872
>> neuronConfig.unload
Error using matlab.cppclient.CLibraryConfiguration/unload
Unloading of library is not supported for 'inprocess' execution mode. Restart MATLAB to unload and then call
'clibConfiguration('neuron','ExecutionMode','outofprocess')'.
Is there another way to terminate neuron, so we can implement a Session destructor?
Once Session has a destructor, we can also add a mlock and munlock to keep it in memory after a clear all, to make it more singleton-esque.
Session currently has no destructor, because we cannot terminate the neuron process while
inprocess
:Is there another way to terminate neuron, so we can implement a Session destructor?
Once Session has a destructor, we can also add a
mlock
andmunlock
to keep it in memory after aclear all
, to make it more singleton-esque.