Share MATLAB Runtime Instances
In a shared MATLAB® Runtime instance or Singleton runtime, you create an instance of the MATLAB Runtime that can be shared among all subsequent class instances within a component.
Advantages and Disadvantages of Using a Singleton
In most cases, a singleton MATLAB Runtime will provide many more advantages than disadvantages.
If you have multiple users running from a specific instance of MATLAB, using a singleton will most likely:
Utilize system memory more efficiently
Decrease MATLAB Runtime start-up or initialization time
Using a singleton may not benefit you if your application uses a large number of global variables. This causes crosstalk.