diff --git a/lib/OpenLayers/Layer/Grid.js b/lib/OpenLayers/Layer/Grid.js index 3e583cfa5f..16b8dca2b2 100644 --- a/lib/OpenLayers/Layer/Grid.js +++ b/lib/OpenLayers/Layer/Grid.js @@ -47,6 +47,23 @@ OpenLayers.Layer.Grid.prototype = OpenLayers.Layer.HTTPRequest.prototype.destroy.apply(this, arguments); }, + /** go through and remove all tiles from the grid, calling + * destroy() on each of them to kill circular references + * + * @private + */ + clearGrid:function() { + if (this.grid) { + for(var iRow=0; iRow < this.grid.length; iRow++) { + var row = this.grid[iRow]; + for(var iCol=0; iCol < row.length; iCol++) { + row[iCol].destroy(); + } + } + this.grid = []; + } + }, + /** * @param {Object} obj * @@ -366,23 +383,6 @@ OpenLayers.Layer.Grid.prototype = }, - /** go through and remove all tiles from the grid, calling - * destroy() on each of them to kill circular references - * - * @private - */ - clearGrid:function() { - if (this.grid) { - for(var iRow=0; iRow < this.grid.length; iRow++) { - var row = this.grid[iRow]; - for(var iCol=0; iCol < row.length; iCol++) { - row[iCol].destroy(); - } - } - this.grid = []; - } - }, - /** * @private *