Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DM-11771: Add destructor to close sqlite connection #77

Merged
merged 2 commits into from Sep 5, 2017

Conversation

n8pease
Copy link
Contributor

@n8pease n8pease commented Sep 1, 2017

No description provided.

Copy link
Member

@timj timj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Even if we go to a close() later, the __del__ will remind us we have resources to free.

@timj timj changed the title Tickets/dm 11771 obs_base fails to build on NFS-mounted systems (daf_persistence) DM-11771: Add destructor to close sqlite connection Sep 1, 2017
note that for __del__ to get called the garbage collector must
be triggered after the final reference has been released. in
unit tests this may be done in tearDown by calling gc.collect.

If we find having or closing the open database connection is a
problem in production code, we may need to
add api to butler to explicity release database connections (and
maybe other things like in-memory cached objects).
@n8pease n8pease merged commit 1e3f45f into master Sep 5, 2017
@ktlim ktlim deleted the tickets/DM-11771 branch August 25, 2018 06:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants