We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 113d744 + bd1d64e commit db12659Copy full SHA for db12659
src/core/CoreNode.ts
@@ -1312,12 +1312,19 @@ export class CoreNode extends EventEmitter {
1312
this.props.texture = null;
1313
this.props.shader = this.stage.defShaderCtr;
1314
1315
+ const children = [...this.children];
1316
+ for (let i = 0; i < children.length; i++) {
1317
+ // eslint-disable-next-line @typescript-eslint/no-non-null-assertion
1318
+ children[i]!.destroy();
1319
+ }
1320
+ // This very action will also remove the node from the parent's children array
1321
+ this.parent = null;
1322
+
1323
if (this.rtt) {
1324
this.stage.renderer.removeRTTNode(this);
1325
}
1326
1327
this.removeAllListeners();
- this.parent = null;
1328
1329
1330
renderQuads(renderer: CoreRenderer): void {
0 commit comments