On Mon, 11 Apr 2022 18:05:09 GMT, Zhengyu Gu <z...@openjdk.org> wrote:
> Please review this small patch that releases temporary charsets to avoid > memory leak. > > Test: > > - [x] jdk_2d > Hmmm, you are right. Phil probably pointed out the same problem, but I misunderstood it. What's odd is that, I tested (made sure that `FcCharSetDestroy` indeed called), it did not crash and `valgrind` showed the leak site disappeared. With your suggested fix, I think we still leak last `unionCharset`. BTW, the API documentation is really unhelpful, Sigh! ------------- PR: https://git.openjdk.java.net/jdk/pull/8187