Every line of 'object destruction in javascript' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.
140 doDestroy(obj: any): void { 141 if (this.definition.destroyMethod && obj[this.definition.destroyMethod]) { 142 obj[this.definition.destroyMethod].call(obj); 143 } 144 }
Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code
66 public destroyObject(obj:GameObject) { 67 var key = obj.key; 68 if (this._pool[key] == null) { 69 this._pool[key] = []; 70 } 71 this._pool[key].push(obj); 72 obj.onDestroy(); 73 var index = this._list.indexOf(obj); 74 if (index != -1) { 75 this._list.splice(index, 1); 76 } 77 }