Skip to content

Commit

Permalink
Move audio cleanup into Target#destroy
Browse files Browse the repository at this point in the history
  • Loading branch information
valadaptive committed Jun 2, 2024
1 parent e8482f0 commit fbd27c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/target.ts
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,6 @@ export default class Target {

public remove() {
this.project.removeTarget(this);
this.audio.disconnect();
this.destroy();
}

Expand Down Expand Up @@ -261,6 +260,7 @@ export default class Target {

public destroy() {
this.reset();
this.audio.disconnect();
this.sprite.unregisterClone(this);
this.scriptListenerCleanup();
this.runtime.stopTargetThreads(this);
Expand Down

0 comments on commit fbd27c9

Please sign in to comment.