sling-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Rohit Kumar (JIRA)" <>
Subject [jira] [Commented] (SLING-3359) Classloader Leak Detector Console Tab
Date Sat, 01 Feb 2014 09:24:09 GMT


Rohit Kumar commented on SLING-3359:

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) {
            } catch (InterruptedException e) {

> Classloader Leak Detector Console Tab
> -------------------------------------
>                 Key: SLING-3359
>                 URL:
>             Project: Sling
>          Issue Type: New Feature
>          Components: Console
>            Reporter: Ian Boston
>            Assignee: Chetan Mehrotra
>         Attachments:
> Chetan has created a classloader leak detector console at
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

View raw message