Skip to content

Commit

Permalink
pass db to abstractIterator so gc keeps it
Browse files Browse the repository at this point in the history
  • Loading branch information
juliangruber committed May 5, 2015
1 parent b2bd73e commit 9064099
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions iterator.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ const util = require('util')


function Iterator (db, options) {
AbstractIterator.call(this, options)
AbstractIterator.call(this, db)

this.binding = db.binding.iterator(options)
this.cache = null
Expand Down Expand Up @@ -51,4 +51,4 @@ Iterator.prototype._end = function (callback) {
}


module.exports = Iterator
module.exports = Iterator

1 comment on commit 9064099

@ralphtheninja
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

Please sign in to comment.