Looking at this code below (taken from the git page)
var redis = require("redis"),
client = redis.createClient(), multi;
// runs immediately
client.mset("incr thing", 100, "incr other thing", 1, redis.print);
multi = client.multi();
// drains multi queue and runs atomically
multi.exec(function (err, replies) {
console.log(replies); // 101, 2
client.quit(); // IS THIS OPTIONAL?
});
I want to know if client.quit() is optional, or if multi.exec() automatically performs a quit for me? I'm trying to debug a memory leak in my redis and I realized I am not using .quit() anywhere. Should I be?
Meaning, should my code look like this?
client = redis.createClient();
multi = clent.multi();
multi.exec( {something} );
client.quit();
Basically, where does client.quit go and do I even need it?