You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Jason van Zyl (JIRA)" <ji...@apache.org> on 2015/05/01 02:11:06 UTC

[jira] [Closed] (MNG-5205) Memory leak in StringSearchModelInterpolator

     [ https://issues.apache.org/jira/browse/MNG-5205?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jason van Zyl closed MNG-5205.
------------------------------
    Resolution: Cannot Reproduce

> Memory leak in StringSearchModelInterpolator
> --------------------------------------------
>
>                 Key: MNG-5205
>                 URL: https://issues.apache.org/jira/browse/MNG-5205
>             Project: Maven
>          Issue Type: Bug
>          Components: Inheritance and Interpolation
>    Affects Versions: 3.0.3
>            Reporter: Jesse Glick
>            Assignee: Kristian Rosenvold
>            Priority: Minor
>             Fix For: Issues to be reviewed for 4.x
>
>         Attachments: x.diff
>
>
> {{StringSearchModelInterpolator}} abuses {{WeakHashMap}}; the {{Field}} values of {{fieldsByClass}} hold hard references to the {{Class}} keys, making it useless. Thus if you passed any {{Class}} to it, that class and its {{ClassLoader}} and the transitive static graph therefrom would never be collectible.
> Anyway a cache is unnecessary, since {{Class}} does its own caching of fields!
> Also removing the ill-conceived {{fieldIsPrimitiveByClass}} - not a memory leak, but likely unnecessary complication.
> The class is deprecated anyway, but just in case it is used by someone it should be fixed.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)