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.![Screen Shot 2023-04-06 at 5 51 19 PM](https://user-images.githubusercontent.com/44760135/230500585-9475094e-f0ff-4a9e-8969-cf26f798df82.png)
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).addAliasedAnnotation
use, solves the problem. Don't know whyaddAliasedAnnotation
oraddAliasedTypeAnnotation
has this wrong behaviour. File an issue to keep track of this bug.