{"action":"created","issue":{"url":"https://api.github.com/repos/qgis/QGIS/issues/2755","repository_url":"https://api.github.com/repos/qgis/QGIS","labels_url":"https://api.github.com/repos/qgis/QGIS/issues/2755/labels{/name}","comments_url":"https://api.github.com/repos/qgis/QGIS/issues/2755/comments","events_url":"https://api.github.com/repos/qgis/QGIS/issues/2755/events","html_url":"https://github.com/qgis/QGIS/pull/2755","id":130639723,"number":2755,"title":"Remove reference counting from  from OgrConnPool","user":{"login":"strk","id":289678,"avatar_url":"https://avatars.githubusercontent.com/u/289678?v=3","gravatar_id":"","url":"https://api.github.com/users/strk","html_url":"https://github.com/strk","followers_url":"https://api.github.com/users/strk/followers","following_url":"https://api.github.com/users/strk/following{/other_user}","gists_url":"https://api.github.com/users/strk/gists{/gist_id}","starred_url":"https://api.github.com/users/strk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strk/subscriptions","organizations_url":"https://api.github.com/users/strk/orgs","repos_url":"https://api.github.com/users/strk/repos","events_url":"https://api.github.com/users/strk/events{/privacy}","received_events_url":"https://api.github.com/users/strk/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/qgis/QGIS/labels/For%20Review","name":"For Review","color":"eb6420"}],"state":"open","locked":false,"assignee":{"login":"manisandro","id":1298852,"avatar_url":"https://avatars.githubusercontent.com/u/1298852?v=3","gravatar_id":"","url":"https://api.github.com/users/manisandro","html_url":"https://github.com/manisandro","followers_url":"https://api.github.com/users/manisandro/followers","following_url":"https://api.github.com/users/manisandro/following{/other_user}","gists_url":"https://api.github.com/users/manisandro/gists{/gist_id}","starred_url":"https://api.github.com/users/manisandro/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/manisandro/subscriptions","organizations_url":"https://api.github.com/users/manisandro/orgs","repos_url":"https://api.github.com/users/manisandro/repos","events_url":"https://api.github.com/users/manisandro/events{/privacy}","received_events_url":"https://api.github.com/users/manisandro/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/qgis/QGIS/milestones/8","html_url":"https://github.com/qgis/QGIS/milestones/2.14","labels_url":"https://api.github.com/repos/qgis/QGIS/milestones/8/labels","id":1324795,"number":8,"title":"2.14","description":"Feature Freeze: Jan 2016\r\nRelease: Feb 2016","creator":{"login":"m-kuhn","id":588407,"avatar_url":"https://avatars.githubusercontent.com/u/588407?v=3","gravatar_id":"","url":"https://api.github.com/users/m-kuhn","html_url":"https://github.com/m-kuhn","followers_url":"https://api.github.com/users/m-kuhn/followers","following_url":"https://api.github.com/users/m-kuhn/following{/other_user}","gists_url":"https://api.github.com/users/m-kuhn/gists{/gist_id}","starred_url":"https://api.github.com/users/m-kuhn/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/m-kuhn/subscriptions","organizations_url":"https://api.github.com/users/m-kuhn/orgs","repos_url":"https://api.github.com/users/m-kuhn/repos","events_url":"https://api.github.com/users/m-kuhn/events{/privacy}","received_events_url":"https://api.github.com/users/m-kuhn/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":56,"state":"open","created_at":"2015-09-26T08:11:50Z","updated_at":"2016-02-02T16:25:11Z","due_on":"2016-01-14T23:00:00Z","closed_at":null},"comments":63,"created_at":"2016-02-02T10:25:55Z","updated_at":"2016-02-03T09:50:54Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/qgis/QGIS/pulls/2755","html_url":"https://github.com/qgis/QGIS/pull/2755","diff_url":"https://github.com/qgis/QGIS/pull/2755.diff","patch_url":"https://github.com/qgis/QGIS/pull/2755.patch"},"body":"Fixes http://hub.qgis.org/issues/14212"},"comment":{"url":"https://api.github.com/repos/qgis/QGIS/issues/comments/179133608","html_url":"https://github.com/qgis/QGIS/pull/2755#issuecomment-179133608","issue_url":"https://api.github.com/repos/qgis/QGIS/issues/2755","id":179133608,"user":{"login":"strk","id":289678,"avatar_url":"https://avatars.githubusercontent.com/u/289678?v=3","gravatar_id":"","url":"https://api.github.com/users/strk","html_url":"https://github.com/strk","followers_url":"https://api.github.com/users/strk/followers","following_url":"https://api.github.com/users/strk/following{/other_user}","gists_url":"https://api.github.com/users/strk/gists{/gist_id}","starred_url":"https://api.github.com/users/strk/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/strk/subscriptions","organizations_url":"https://api.github.com/users/strk/orgs","repos_url":"https://api.github.com/users/strk/repos","events_url":"https://api.github.com/users/strk/events{/privacy}","received_events_url":"https://api.github.com/users/strk/received_events","type":"User","site_admin":false},"created_at":"2016-02-03T09:50:54Z","updated_at":"2016-02-03T09:50:54Z","body":"BUT acquired connection do not hold a reference, and there's no RAII ensuring obtained references are properly dropped. This is the kind of complexity I'd rather avoid, if possible. QGIS is already known to be not-so-stable, in general, so any proper behaviour that could be enforced by design would be to be preferred (IMHO).\r\n\r\nOne idea could be for refcounts to be distributed under form of objects that decrement the refcount on their destruction. There would then be a single method added in OgrPool, being the method to obtain such object. Such method could at the same time remove the cleanup timer and basically transfer ownership of the PoolGroup to all the owners of the shared \"lock\". Acquiring a connection could then require presenting the \"lock\" object as a proof. Anyway, this is brainstorming and doesnt' really belong in this PR, which was just aimed at fixing http://hub.qgis.org/issues/14212"}}