-
Notifications
You must be signed in to change notification settings - Fork 74
Closed
Description
We can see that lines 966 and 968 initialise this._image to an Image object:
corescript/js/rpg_core/Bitmap.js
Lines 964 to 970 in 9524d3b
| Bitmap.prototype._requestImage = function(url){ | |
| if(Bitmap._reuseImages.length !== 0){ | |
| this._image = Bitmap._reuseImages.pop(); | |
| }else{ | |
| this._image = new Image(); | |
| } | |
However later on this handle is replaced with a new image object on line 975:
corescript/js/rpg_core/Bitmap.js
Lines 974 to 978 in 9524d3b
| this._image = new Image(); | |
| this._url = url; | |
| this._loadingState = 'requesting'; | |
Is there behaviour that is not obvious here?
This looks like a bug, the result is that the image reuse mechanism isn't being used at all and duplicate image objects are being allocated needlessly. The effects of fixing this should probably be investigated.
Metadata
Metadata
Assignees
Labels
No labels