W3C home > Mailing lists > Public > public-device-apis-log@w3.org > December 2018

Re: [wake-lock] Remove cancel() (#134)

From: Andrey Logvinov via GitHub <sysbot+gh@w3.org>
Date: Thu, 06 Dec 2018 13:52:43 +0000
To: public-device-apis-log@w3.org
Message-ID: <issue_comment.created-444877302-1544104362-sysbot+gh@w3.org>
`wakeLockRequest = null` only destroys the reference, it does nothing to the actual WakeLockRequest object.
Garbage collection is implementation-specific and non-deterministic, i.e. there is no guarantee or even a reliable prediction when a particular unreferenced object will be destroyed. This may lead to wake lock being held for longer than needed, or potentially indefinitely.

GitHub Notification of comment by andrey-logvinov
Please view or discuss this issue at https://github.com/w3c/wake-lock/issues/134#issuecomment-444877302 using your GitHub account
Received on Thursday, 6 December 2018 13:52:44 UTC

This archive was generated by hypermail 2.4.0 : Monday, 4 July 2022 12:47:55 UTC