{"action":"closed","issue":{"url":"https://api.github.com/repos/sergeyshushlyapin/Sitecore.FakeDb/issues/70","labels_url":"https://api.github.com/repos/sergeyshushlyapin/Sitecore.FakeDb/issues/70/labels{/name}","comments_url":"https://api.github.com/repos/sergeyshushlyapin/Sitecore.FakeDb/issues/70/comments","events_url":"https://api.github.com/repos/sergeyshushlyapin/Sitecore.FakeDb/issues/70/events","html_url":"https://github.com/sergeyshushlyapin/Sitecore.FakeDb/issues/70","id":89905922,"number":70,"title":"What is the purpose of disposing Db object?","user":{"login":"AlenPelin","id":2854666,"avatar_url":"https://avatars.githubusercontent.com/u/2854666?v=3","gravatar_id":"","url":"https://api.github.com/users/AlenPelin","html_url":"https://github.com/AlenPelin","followers_url":"https://api.github.com/users/AlenPelin/followers","following_url":"https://api.github.com/users/AlenPelin/following{/other_user}","gists_url":"https://api.github.com/users/AlenPelin/gists{/gist_id}","starred_url":"https://api.github.com/users/AlenPelin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/AlenPelin/subscriptions","organizations_url":"https://api.github.com/users/AlenPelin/orgs","repos_url":"https://api.github.com/users/AlenPelin/repos","events_url":"https://api.github.com/users/AlenPelin/events{/privacy}","received_events_url":"https://api.github.com/users/AlenPelin/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-06-21T12:34:29Z","updated_at":"2015-06-21T14:33:26Z","closed_at":"2015-06-21T14:33:26Z","body":"The Db class implements IDisposable interface and in examples this object is always gets disposed via using statement. \r\n\r\nQuestion: Is there any negative consequences in leaving Db object indisposed?\r\n\r\nThe reason of this question is shorting the syntax and improving code style from\r\n```c#\r\nusing(var db = new Db {\r\n  new DbItem(\"test\") { \r\n    new DbField(\"field\") { Value = \"value\" } } })\r\n{\r\n  var test = db.GetItem(\"/sitecore/content/test\");\r\n  Assert.IsNotNull(test);\r\n}\r\n```\r\nto\r\n```c#\r\nvar db = new Db {\r\n  new DbItem(\"test\") { \r\n      new DbField(\"field\") { Value = \"value\" } } };\r\n\r\nvar test = db.GetItem(\"/sitecore/content/test\");\r\nAssert.IsNotNull(test);\r\n```"}}