the way our UI works the map can be opened or closed depending on what the user is doing, when i remove the map from the dom it seems to still be holding on to memory, it just keeps going up and up until the browser becomes unresponsive. is there a better way to do this? this is my current code
this.$mainDiv.find(".arc-div").remove();
this.ArcView.map = null;
this.ArcMap.removeAll();
this.ArcMap = null;
this.ArcView = null;
it seems like the tiles are still in memory they get orphaned so it never gets cleaned up. any help would be awesome! thanks!
Solved! Go to Solution.
Jon Mullen - yes, this was fixed in 4.4 (as far as we know). Do you have a simple test app for 4.5 (or even better 4.6) that shows the issue you're seeing?
Sorry for taking a while to respond, but I had a mistake in my code. Thanks.
view.container = null is illustrated on the following example which toogle view from 2D to 3D:
Switch view from 2D to 3D | ArcGIS API for JavaScript 4.7
But in Typescript, container property has to be an HTLMDivElement so you get an error (constructor accepts undefined though).
What would be the Typescript way then ?
Cheers !
null should work.
Maybe you have enabled "--strictNullChecks" in your tsconfig?
https://www.typescriptlang.org/docs/handbook/compiler-options.html