Open
Description
Created by: jdf
In the following sketch, the dispose handler is called when the escape key is pressed, but not when the stop button is pressed.
dispose_bug
SampleLibrary s;
void setup() {
size(200, 200, P3D);
s = new SampleLibrary(this);
}
void draw() {
background(255);
fill(0);
text("" + millis(), 20, 20);
}
SampleLibrary.java
import processing.core.*;
public class SampleLibrary {
public SampleLibrary(PApplet parent) {
parent.registerMethod("dispose", this);
}
public void dispose() {
System.err.println("disposed!");
}
}