function mpsPctSwitchMcrInstance

% Copyright 2015 The MathWorks, Inc.
%
% This function invokes a Java method to re-initialize PCT's cached handle to 
% the MCR. PCT should be shut down first (see mpsPctShutdown.m) to guarantee 
% that the previous MCR instance is no longer referenced.
%
% Without this call, PCT will report an error that only one MCR instance 
% (per process) can use PCT

import com.mathworks.toolbox.distcomp.util.MatlabRefStore;

% Re-initialize PCT's handle to the MCR instance
MatlabRefStore.reinitMatlabRef();


