Close frees the resources held by the iterator
()
| 409 | |
| 410 | // Close frees the resources held by the iterator |
| 411 | func (s *Iterator) Close() error { |
| 412 | s.list.DecrRef() |
| 413 | return nil |
| 414 | } |
| 415 | |
| 416 | // Valid returns true iff the iterator is positioned at a valid node. |
| 417 | func (s *Iterator) Valid() bool { return s.n != nil } |