« Return to Thread: monitoring memory leaks

Re: monitoring memory leaks

by Endre Stølsvik-8 :: Rate this Message:

Reply to Author | View in Thread

Not that I know of.

Here's a hack:

    public static <E> List<ListEventListener<E>>
getListEventListeners(EventList<E> from) throws
IllegalArgumentException {
        Field updatesField;
        try {
            updatesField = AbstractEventList.class.getDeclaredField("updates");
        }
        catch (NoSuchFieldException e) {
            throw new IllegalArgumentException("The EventList [" +
from + "] does not contain an \"updates\" field.");
        }
        updatesField.setAccessible(true);
        ListEventAssembler<E> updates;
        try {
            updates = (ListEventAssembler<E>) updatesField.get(from);
        }
        catch (IllegalAccessException e) {
            throw new AssertionError(e);
        }
        return updates.getListEventListeners();
    }


On Fri, Apr 24, 2009 at 11:38, Marcin Szkudlarek
<marcin.szkudlarek@...> wrote:

>
> I'm looking for a way to check the number of ListEventListeners for a list.
> Is it possible with the current API?
> --
> View this message in context: http://www.nabble.com/monitoring-memory-leaks-tp23213097p23213097.html
> Sent from the GlazedLists - User mailing list archive at Nabble.com.
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@...
> For additional commands, e-mail: users-help@...
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@...
For additional commands, e-mail: users-help@...

 « Return to Thread: monitoring memory leaks