Skip to content
This repository has been archived by the owner on Mar 14, 2018. It is now read-only.

Question related to cleaning up of runningObservers list #290

Open
samiahmedshaik opened this issue Nov 24, 2017 · 1 comment
Open

Question related to cleaning up of runningObservers list #290

samiahmedshaik opened this issue Nov 24, 2017 · 1 comment
Assignees
Labels

Comments

@samiahmedshaik
Copy link

In the observeDo(double secs) method of Region class, there is a call Observing.addRunningObserver(this); to add the current region to the runningObservers list. But when the observeDo method ends (i.e. Running observer ends), there SHOULD be a call to remove the Region from the runningObservers list (such as Observing.removeRunningObserver(this)) otherwise the memory consumption is increasing as more and more regions gets added to the runningObservers list there by causing Out of Memory exceptions.

I believe the simple fix would be to add Observing.removeRunningObserver(this) at the very end of the observeDo method.

@RaiMan
Copy link
Owner

RaiMan commented Nov 26, 2017

Thanks for the pointer.
I will check and fix what is needed in 1.1.2 nightly the next days.

@RaiMan RaiMan self-assigned this Nov 26, 2017
@RaiMan RaiMan added the bug label Nov 26, 2017
@RaiMan RaiMan added this to the 1.1.2 bug fix release milestone Nov 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants