MacHu-GWU / uszipcode-project

USA zipcode programmable database, includes up-to-date census and geometry information.
MIT License
231 stars 49 forks source link

Check for dangling connections and cleanup in SearchEngine destructor #23

Closed apryor6 closed 5 years ago

apryor6 commented 5 years ago

This adds a simple check to cleanup dangling DB connections when the SearchEngine is destroyed. If the user is properly using context management using the with statement, this is not needed, but it prevents a class of errors where a new SearchEngine is created but .close() is not specifically called.

MacHu-GWU commented 5 years ago

@apryor6 thank you very much for this!