MCPcopy Index your code
hub / github.com/benfry/processing4 / shutdown

Method shutdown

app/src/processing/app/Console.java:178–190  ·  view source on GitHub ↗

Close the streams so that the temporary files can be deleted. File.deleteOnExit() cannot be used because the stdout and stderr files are inside a folder, and have to be deleted before the folder itself is deleted, which can't be guaranteed when using the deleteOnExit() method.

()

Source from the content-addressed store, hash-verified

176 * the deleteOnExit() method.
177 */
178 static public void shutdown() {
179 // replace original streams to remove references to console's streams
180 System.setOut(systemOut);
181 System.setErr(systemErr);
182
183 cleanup(consoleOut);
184 cleanup(consoleErr);
185
186 // also have to close the original FileOutputStream
187 // otherwise it won't be shut down completely
188 cleanup(stdoutFile);
189 cleanup(stderrFile);
190 }
191
192
193 static private void cleanup(OutputStream output) {

Callers 3

handleQuitMethod · 0.95
disposeMethod · 0.45
setColumnTypesMethod · 0.45

Calls 1

cleanupMethod · 0.95

Tested by

no test coverage detected