You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by "Rohit Kumar (JIRA)" <ji...@apache.org> on 2014/02/01 10:26:09 UTC
[jira] [Issue Comment Deleted] (SLING-3359) Classloader Leak
Detector Console Tab
[ https://issues.apache.org/jira/browse/SLING-3359?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Rohit Kumar updated SLING-3359:
-------------------------------
Comment: was deleted
(was: Just a small observation. I guess following code might prevent garbage collection of last BundleReference object and in turn the classloader associated with it. Local variable "ref" will hold reference to last BundleReference object returned from queue until queue does not generate a new entry. So for waiting duration, last BundleReference object cannot be gced.
We should probably assign null to ref after each iteration of the loop.
while (!Thread.currentThread().isInterrupted()) {
try {
BundleReference ref = (BundleReference) queue.remove();
if (ref != null) {
removeBundle(ref);
}
} catch (InterruptedException e) {
break;
})
> Classloader Leak Detector Console Tab
> -------------------------------------
>
> Key: SLING-3359
> URL: https://issues.apache.org/jira/browse/SLING-3359
> Project: Sling
> Issue Type: New Feature
> Components: Console
> Reporter: Ian Boston
> Assignee: Chetan Mehrotra
> Attachments: org.apache.sling.extensions.classloader-leak-detector-0.0.1-SNAPSHOT-src.zip
>
>
> Chetan has created a classloader leak detector console at https://github.com/chetanmeh/sling-leak-detector. It would be really good to get this into the contrib are and released so that consumers of Sling can use it to locate code in bundles that is leaking classloaders.
--
This message was sent by Atlassian JIRA
(v6.1.5#6160)