Close instance TupleQueryResult after using
- issue #1032