-
Notifications
You must be signed in to change notification settings - Fork 91
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak while creating layers #32
Comments
AlexKven
pushed a commit
to AlexKven/BlazorLeaflet
that referenced
this issue
Jun 3, 2020
…leak. Mehigh17#29 Enables the Center and Zoom properties to set these properties on the map in the background. Mehigh17#30 Adds a Bounds property to the map that is automatically kept up to date with the map bounds. Mehigh17#32 Fixes a memory leak related to creating layers.
AlexKven
pushed a commit
to AlexKven/BlazorLeaflet
that referenced
this issue
Jun 10, 2020
Mehigh17
added a commit
that referenced
this issue
Jun 10, 2020
#32 Fixed memory leak when creating layers
Hmmm, I ran into a "item with same key already exists" exception. I haven't looked into how layer IDs (used as keys here) get generated, but perhaps they get incorrectly reused, or maybe there's a concurrency issue here. |
FrankHellwich
added a commit
to FrankHellwich/BlazorLeaflet
that referenced
this issue
Oct 2, 2023
…initialization from AlexKven-deature/settable-properties
FrankHellwich
added a commit
to FrankHellwich/BlazorLeaflet
that referenced
this issue
Oct 2, 2023
…initialization from AlexKven-deature/settable-properties
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, when the
AddLayer
method onLeavletInterop.cs
is run, it creates a newDotNetObjectReference
and passes that to the JavaScript:However, since
DotNetObjectReference
must be disposed when no longer needed, this is a memory leak, sinceLeafletInterop
doesn't keep track of these references and dispose them when the layer is removed. I will fix this in my PR.The text was updated successfully, but these errors were encountered: