In order to resolve a memory leak in IE, observable via drip, remove elemnts
from panels before calling innerHTML. This resolves the memory error. All tests pass in FF and IE, and there are no obvious side effects I can imagine; committing. Patch from aabt, r=me, (Closes #2745) git-svn-id: http://svn.openlayers.org/trunk/openlayers@10665 dc9f47b5-9b13-0410-9fdd-eb0c1a62fdaf
This commit is contained in:
@@ -146,6 +146,11 @@ OpenLayers.Control.Panel = OpenLayers.Class(OpenLayers.Control, {
|
||||
* Method: redraw
|
||||
*/
|
||||
redraw: function() {
|
||||
if (this.div.children.length>0) {
|
||||
for (var l=this.div.children.length, i=l-1 ; i>=0 ; i--) {
|
||||
this.div.removeChild(this.div.children[i]);
|
||||
}
|
||||
}
|
||||
this.div.innerHTML = "";
|
||||
if (this.active) {
|
||||
for (var i=0, len=this.controls.length; i<len; i++) {
|
||||
|
||||
Reference in New Issue
Block a user