Update from Matlab - Java 8 is not supported on Matlab2014b or Matlab2015a, and will cause issues.
"I am writing regarding 'MATLAB 2014b/2015a potential Java bug'.
I understand that MATLAB is throwing Java out-of-memory errors on your MacBook.
On Mac, R2014b and R2015a, MATLAB are tested, qualified, and shipped with Java versions 1.7.0_55-b13 and Java 1.7.0_60-b19 respectively. MATLAB currently does not support Java 8.
Thus, please try reverting MATLAB to the above Java 7 versions and see if the errors still occur. If reverting the Java versions do not resolve the issue, or if you have any further questions, please let me know and I will be happy to help."