MCPcopy Index your code
hub / github.com/processing/processing / dispose

Method dispose

core/src/processing/core/PApplet.java:3825–3850  ·  view source on GitHub ↗

Called to dispose of resources and shut down the sketch. Destroys the thread, dispose the renderer,and notify listeners. Not to be called or overriden by users. If called multiple times, will only notify listeners once. Register a dispose listener instead.

()

Source from the content-addressed store, hash-verified

3823 * will only notify listeners once. Register a dispose listener instead.
3824 */
3825 public void dispose() {
3826 // moved here from stop()
3827 finished = true; // let the sketch know it is shut down time
3828
3829 // don't run the disposers twice
3830 if (surface.stopThread()) {
3831
3832 // shut down renderer
3833 if (g != null) {
3834 g.dispose();
3835 }
3836 // run dispose() methods registered by libraries
3837 handleMethods("dispose");
3838 }
3839
3840 if (platform == MACOSX) {
3841 try {
3842 final String td = "processing.core.ThinkDifferent";
3843 final Class<?> thinkDifferent = getClass().getClassLoader().loadClass(td);
3844 thinkDifferent.getMethod("cleanup").invoke(null);
3845 } catch (Exception e) {
3846 e.printStackTrace();
3847 }
3848 }
3849
3850 }
3851
3852
3853

Callers 6

dieMethod · 0.95
exitMethod · 0.95
runMethod · 0.45
shrinkImageMethod · 0.45
saveImageIOMethod · 0.45
endRecordMethod · 0.45

Calls 6

handleMethodsMethod · 0.95
loadClassMethod · 0.80
getClassLoaderMethod · 0.80
getMethodMethod · 0.80
stopThreadMethod · 0.65
printStackTraceMethod · 0.45

Tested by

no test coverage detected