fredj/openlayers — comment on commit fe202cef14e1ea750d7b26ab922dacbb8b5f74e3
File:  line 0
By ahocevar:

The problem I see with this approach is that binding the callback function to the scope could cause memory leaks when a tile is destroyed before the callback is executed. I would more prefer something like

getURLasync: function(bounds, callback, scope) {
callback.call(scope, url);
}

and expect the callback function to receive the url as argument (in ```Tile/Image.js```):

getURLasync(bounds, function(url) { this.url = url; this.initImage(); }, this);