Prevent memory leak from LocallyDB.