There is another potential memory leak that could trigger in the exisitng code, in that the original class bytes could be saved already for initial class loads, if an agent modified the bytes. The code only takes into account if an agent transformed bytes on retransform, not on initial load. The same logic applies, and so it can be better unified. Also makes sense to remove some remnants in the jfrJvmtiAgent that became obsolete with
Potential memory leak in JFR event class transformer
There is another potential memory leak that could trigger in the exisitng code, in that the original class bytes could be saved already for initial class loads, if an agent modified the bytes. The code only takes into account if an agent transformed bytes on retransform, not on initial load. The same logic applies, and so it can be better unified. Also makes sense to remove some remnants in the jfrJvmtiAgent that became obsolete with