eclipse-aspectj / aspectj

Other
291 stars 84 forks source link

Avoid ThreadLocal memory leak in JoinPointImpl #291

Closed kriegaex closed 6 months ago

kriegaex commented 7 months ago

according to RSPEC-5164.

Fixes #288, #141.

kriegaex commented 7 months ago

@aclement, knowing your time constraints, I would merge without your review, too, but I want to invite you to take a look, because you also participated in the discussion about #128, in which I introduced the imperfect inheritable thread-local solution which fixed #128, but left #141 open and, as we now know, caused the memory leak in #288.

This PR fixes both problems in one change and also adds regression tests, i.e. it is a fix and a feature enhancement at the same time. Because JoinPointImpl is such a central place in the runtime API, I would appreciate your feedback.