Fix resource leaks discovered while testing
- `Drawable` now removes its `Skin` on `dispose`, disconnecting events. - Creating a new `Drawable` doesn't always create a new `Skin` any more: now it can share an existing skin. - Don't throw when asked to update the properties of a `Drawable` that has already been destroyed. This seems like a VM bug but was causing overwhelming output in the browser for some projects.
This commit is contained in:
@@ -37,6 +37,8 @@ class Skin extends EventEmitter {
|
||||
*/
|
||||
u_skin: null
|
||||
};
|
||||
|
||||
this.setMaxListeners(RenderConstants.SKIN_SHARE_SOFT_LIMIT);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user