You create an instance of the MATLAB® Runtime that can be shared among all subsequent class instances within a component. This is commonly called a shared MATLAB Runtime instance or a Singleton runtime.
In most cases, a singleton MATLAB Runtime will provide many more advantages than disadvantages. Following are examples of when you might and might not create a shared MATLAB Runtime instance.
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.