X-1.0: Is it necessary to destroy finder after casting it to list? --- NO!
http://
Doc says Finder has to be destroyed when used with for: or while:
Is it necessary to destroy it when converting to list? E.g.
matches = list(finder)
Isn't it destroyed automatically after leaving local scope, where a region.
With the information above the second example at http://
...
f.find(img) # find all matches
mm = [] # an empty list
while f.hasNext(): # loop as long there is a first and more matches
print f.hasNext() # is False, because f is empty now
f.destroy() # release the memory used by finder
to:
...
mm = list(f.find(img))
Question information
- Language:
- English Edit question
- Status:
- Answered
- For:
- SikuliX Edit question
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask anatoly techtonik for more information if necessary.