Le 25/07/2015 11:32, Tim Guan-tin Chien a écrit :
> Hi,
> 
> SettingsListener was one of the oldest piece of Gaia, and it even
> reaches into Gecko b2g/. However for years it's problem has not been
> widely communicated.
> 
> == Problems ==

[...]

There's another big issue: the |observe()| method does a
|mozSettings.addObserver()| each times it is called.

Code using this should be aware of this. We landed "unobserve" method to
make it more obvious that this needs to be taken care of.

Now, one issue that is specific to System app mostly is the case where
code path that does |SettingsListener.observe()| are called in a
recurrent manner. This is leaking observers on the API.

As much as I debugged last time on the API side, it was quite tricky to
detect those bad cases. We do cleanup observers reference when
windows/apps are being killed but System app is not always in this case.

One nasty consequence of those leaks is that your device will slowly
become slower over time.

_______________________________________________
dev-b2g mailing list
dev-b2g@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-b2g

Reply via email to