Opened 7 years ago

Closed 7 years ago

#4388 closed defect (fixed)

Memory leak - previousState

Reported by: Richard Owned by: potlatch-dev@…
Priority: critical Milestone:
Component: potlatch2 Version:
Keywords: Cc:


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. :)

Change History (1)

comment:1 Changed 7 years ago by Richard

Resolution: fixed
Status: newclosed
Note: See TracTickets for help on using tickets.