Skip to content

Commit a27cb54

Browse files
committed
Removed cursor memory leak
1 parent 73f1e27 commit a27cb54

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

lib/mongodb/cursor.js

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -614,10 +614,7 @@ Cursor.prototype.close = function(callback) {
614614
if(this.cursorId instanceof self.db.bson_serializer.Long && this.cursorId.greaterThan(self.db.bson_serializer.Long.fromInt(0))) {
615615
try {
616616
var command = new KillCursorCommand(this.db, [this.cursorId]);
617-
var killCursorCommandHandler = function(err, result) {};
618-
this.db.executeCommand(command, killCursorCommandHandler);
619-
620-
killCursorCommandHandler = null;
617+
this.db.executeCommand(command, null);
621618
} catch(err) {}
622619
}
623620

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{ "name" : "mongodb"
22
, "description" : "A node.js driver for MongoDB"
3-
, "version" : "0.9.0"
3+
, "version" : "0.9.1"
44
, "author" : "Christian Amor Kvalheim <christkv@gmail.com>"
55
, "contributors" : [ "Nathan White <nw@nwhite.net>",
66
"Adam Wiggins <adam@heroku.com>",

0 commit comments

Comments
 (0)