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