Skip to content

Commit

Permalink
Clarify close() documentation (#197)
Browse files Browse the repository at this point in the history
  • Loading branch information
vweevers committed Jun 7, 2021
1 parent adfc39d commit c82fdbc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ If no callback is passed, a promise is returned.

<code>close()</code> closes the underlying store. The callback will receive any error encountered during closing as the first argument.

You should always clean up your `levelup` instance by calling `close()` when you no longer need it to free up resources. A store cannot be opened by multiple instances of `levelup` simultaneously.
A `levelup` instance has associated resources like file handles and locks. When you no longer need your `levelup` instance (for the remainder of your program) call `close()` to free up resources. The underlying store cannot be opened by multiple instances of `levelup` simultaneously.

If no callback is passed, a promise is returned.

Expand Down

0 comments on commit c82fdbc

Please sign in to comment.