When running PICO-Infer's testsuite, some heap memory is not released, and after running a while, OOM error will be raised.

This is caused by circular reference and thus GC cannot free this memory.

Noticed that the aliases field indirectly referenced to the last picoinferencechecker instantiated (last testcase).

Commenting out the addAliasedAnnotation use, solves the problem. Don't know why addAliasedAnnotation or addAliasedTypeAnnotation has this wrong behaviour. File an issue to keep track of this bug.
When running PICO-Infer's testsuite, some heap memory is not released, and after running a while, OOM error will be raised.

This is caused by circular reference and thus GC cannot free this memory.

Noticed that the
aliasesfield indirectly referenced to the last picoinferencechecker instantiated (last testcase).Commenting out the
addAliasedAnnotationuse, solves the problem. Don't know whyaddAliasedAnnotationoraddAliasedTypeAnnotationhas this wrong behaviour. File an issue to keep track of this bug.