Add deletes to line test to avoid memory leak