I think i found a bug/memory leak. I have an app that can load layers based on a config. The layers can be loaded on the flysetA (15 layers, some dynamic, some tiled)setB (3 layers, some dynamic, some tiled)setC (10 layers, some dynamic, some tiled)I can start the map with setB, and unload reload (remove all, addLayers[setb]) with no problemI can do the same with A or B, and switch amongst them, without issue.ERRORIf i add a legendI can start the map with setB, and unload reload (remove all, addLayers[setb]) with no problemI can start the map with setA, and switch to setB, without problem. If I start with any set, and switch to A or C, firefox usage goes up over 1 gb, goes not responding, never comes back (and the "onaddlayersresult event never fires")if i change to code to
if(legend){
legend.destroy();
map.addLayers[setB];
createLegend();}
it works perfectly, in just a few seconds.bug/memory leak? ir bad workflow. Right now i have to code in to replace the legend , but it seems "hacky"