Memory leak in MapControls
There seems to be a memory leak in MapControls and it keeps a reference to the Map this prevents the entire map, and its parent, from being garbage collected.
The problem is with attaching the event listener to the stage in onAddedToStage. By making this use a weak reference the problem is solved.
Changed code, lines 130/1:
if (keyboard) stage.addEventListener(KeyboardEvent.KEY_UP, onStageKeyUp, false, 0, true);
if (fullScreen) stage.addEventListener(FullScreenButton.FULL_SCREEN, onFullScreenEvent, false, 0, true);
Note the extra parameters to the addEventListener call.
The problem is with attaching the event listener to the stage in onAddedToStage. By making this use a weak reference the problem is solved.
Changed code, lines 130/1:
if (keyboard) stage.addEventListener(KeyboardEvent.KEY_UP, onStageKeyUp, false, 0, true);
if (fullScreen) stage.addEventListener(FullScreenButton.FULL_SCREEN, onFullScreenEvent, false, 0, true);
Note the extra parameters to the addEventListener call.
1
person has this problem
I have this problem, too!
Tell me when someone solves it.
The more people who report this problem, the more it gets noticed.
The more people who report this problem, the more it gets noticed.
Create a customer community for your own organization
Plans starting at $19/month
-
Inappropriate?Thanks for letting us know. I suspect this hasn't previously been a problem because we rarely, if ever, use more than one map.
Are there other things we're doing that made having more than one map difficult? Or are you just being thorough?
I’m thankful
-
Inappropriate?I have been quite happily using several maps at once generally without problem. With more than one map showing overlapping areas sometimes not all the tiles appear, however I haven't investigated this to try and identify if the problem is to do with the runtime, browser, map service or map component.
Loading Profile...



EMPLOYEE