MIJ: Closing all windows of ImageJ when running form Matlab


I am running ImageJ from Matlab via MIJ, which works nicely! When I am done with the analysis and measurement, I close all ImageJ windows by calling MIJ.closeAllWindows() in Matlab. Unfortunately, this gets stuck on the Results window and asks me if I want to save these measurements. Is there a way - programmatically - to skip/dismiss this dialog and not save the measurements and simply close all windows?
Also is there possibly a way to run ImageJ from Matlab without displaying it, i.e running in background?


Figured it out myself:

Clearing results via run(“Clear Results”); will result in no prompt appearing upon closing.