Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Call super.dispose after doing subclass-specific disposal #49

Closed
pixelzoom opened this issue Jun 28, 2022 · 1 comment
Closed

Call super.dispose after doing subclass-specific disposal #49

pixelzoom opened this issue Jun 28, 2022 · 1 comment
Assignees

Comments

@pixelzoom
Copy link
Contributor

For code review #41 ...

super.dispose is typically called after doing any subclass-specific disposal. This sim is doing the opposite.

For example in WaterCup3DNode.ts:

  public override dispose(): void {
    super.dispose();
    this.waterLevelTriangle.dispose();
    this.adapterProperty.dispose();
    this.introModel.isShowingTickMarksProperty.unlink( this.showTickMarksLink );
    this.cup3DModel.resetEmitter.removeAllListeners();
  }

Search for super.dispose, I think the order is reversed everywhere.

@marlitas
Copy link
Contributor

Since moving everything to static allocation, disposal is no longer required for any of the elements in this screen. Closing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants