Skip to content
This repository has been archived by the owner on Jul 24, 2021. It is now read-only.

Memory leak - previousState #4388

Closed
openstreetmap-trac opened this issue Jul 23, 2021 · 0 comments
Closed

Memory leak - previousState #4388

openstreetmap-trac opened this issue Jul 23, 2021 · 0 comments

Comments

@openstreetmap-trac
Copy link

Reporter: Richard
[Submitted to the original trac issue database at 11.18am, Wednesday, 2nd May 2012]

Each ControllerState has a previousState property.

This is a significant memory leak, as it means that controllerStates are never garbage-collected: there's always a previousState reference from the next one, which in turn has a reference from the next one, and so on.

previousState is only actually used by DragBackground (to resume the previous state afterwards), so we should make this an instance variable for DragBackground only, and make sure it is nuked on exitState.

As maintainer I hereby abuse my privileges to log this as 'critical', but mostly with the understanding that I am volunteering to fix it and this is mostly an aide-memoire. :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant