Does anyone know what the matlab mex library lifecycle is? Specifically I am interested in the following:
- Is there a way to force the library to be loaded before invoking it?
- Is the library a singleton or are multiple instances loaded?
- Are there any hooks for initialization prior to invocation?
- Is there a destructor hook/signal that can be intercepted when the library is unloaded for cleanup?
I did an extensive search here and online and I could not find the answers to these questions. My problem has some performance cost with initialization and I would like to avoid that if possible, without needing to write a service.