← Back to team overview

sikuli-driver team mailing list archive

Re: [Question #204098]: Meet OutOfMemoryError with JAVA

 

Question #204098 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/204098

    Status: Open => Answered

RaiMan proposed the following answer:
Yes it is true, that the error is produced when Sikuli convertes an
image to the representation, that is used for matching in the native
code of OpenCV.

But this is only a symptom, since these are the most memory consuming
operations, that could temporarily add some Megabytes to the heap. But
all these possible internal memory leaks are fixed meanwhile. If your
program is written in a way. that your images can be garbage collected
when necessary, this should not give any problems.

So check your code about holding images longer as needed resulting from capture operations like
image = Screen.capture();

If you do not need this image any more, this should help, to let the stuff get garbage collected.
image = null;

-- 
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.