Commit 72c51aa2 by Dane Springmeyer

Merge pull request #307 from thierer/master

Fix leak in complete() callback of Database.each()
parents d61e4c33 df36256d
......@@ -122,10 +122,14 @@ public:
struct Async;
struct EachBaton : Baton {
EachBaton(Statement* stmt_, Handle<Function> cb_) :
Baton(stmt_, cb_) {}
Persistent<Function> completed;
Async* async; // Isn't deleted when the baton is deleted.
EachBaton(Statement* stmt_, Handle<Function> cb_) :
Baton(stmt_, cb_) {}
virtual ~EachBaton() {
NanDisposePersistent(completed);
}
};
struct PrepareBaton : Database::Baton {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment