Release db handler variables on close