Skip to content

Commit

Permalink
docs: additional note on deinit
Browse files Browse the repository at this point in the history
  • Loading branch information
mitranim committed May 18, 2017
1 parent 1e9f922 commit 33aed9a
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions docs/html/partials/interfaces.md
Expand Up @@ -16,6 +16,10 @@ Interface for objects that have a _lifetime_ and must be deinitialised before
you can leave them to the GC. `.deinit()` should make the object inert,
releasing any resources it owns, tearing down any subscriptions, etc.

`.deinit()` must be idempotent and reentrant: redundant calls to `.deinit()`,
even when accidentally overlapping with an ongoing `.deinit()` call, should have
no adverse effects.

```js
isDeinitable(null) // false
isDeinitable(new Que()) // true
Expand Down

0 comments on commit 33aed9a

Please sign in to comment.