{"action":"closed","issue":{"url":"https://api.github.com/repos/mafintosh/mongojs/issues/323","repository_url":"https://api.github.com/repos/mafintosh/mongojs","labels_url":"https://api.github.com/repos/mafintosh/mongojs/issues/323/labels{/name}","comments_url":"https://api.github.com/repos/mafintosh/mongojs/issues/323/comments","events_url":"https://api.github.com/repos/mafintosh/mongojs/issues/323/events","html_url":"https://github.com/mafintosh/mongojs/issues/323","id":180497191,"number":323,"title":"[question] is it necessary to call `db.close` when you're done with the connection?","user":{"login":"wearhere","id":110000,"avatar_url":"https://avatars.githubusercontent.com/u/110000?v=3","gravatar_id":"","url":"https://api.github.com/users/wearhere","html_url":"https://github.com/wearhere","followers_url":"https://api.github.com/users/wearhere/followers","following_url":"https://api.github.com/users/wearhere/following{/other_user}","gists_url":"https://api.github.com/users/wearhere/gists{/gist_id}","starred_url":"https://api.github.com/users/wearhere/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/wearhere/subscriptions","organizations_url":"https://api.github.com/users/wearhere/orgs","repos_url":"https://api.github.com/users/wearhere/repos","events_url":"https://api.github.com/users/wearhere/events{/privacy}","received_events_url":"https://api.github.com/users/wearhere/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-10-02T05:52:51Z","updated_at":"2016-12-21T17:23:46Z","closed_at":"2016-12-21T17:23:46Z","body":"Hi, in my application I create secondary DB connections for some long-running operations (per the recommendation of http://mongodb.github.io/node-mongodb-native/2.0/reference/faq/#how-can-i-avoid-a-very-slow-operation-delaying-other-operations). Is it necessary to call [`close`](http://mongodb.github.io/node-mongodb-native/2.2/api/Db.html#close) on them when done? i.e.\n\n``` js\nvar db = mongojs(...);\n\ndb.collection('foo').update(..., function(err) {\n  db.close();  // Is this necessary?\n});\n```\n\nWhat happens if I don't call `close` and `db` just drops out of scope and gets garbage collected?\n"}}
{"actor":{"display_login":"wearhere"}}