Skip to content

dispose handlers not called when stop button pressed #631

Open
@processing-bot

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!");
  }
}

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions