You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@pivot.apache.org by Joseph Paterson <jo...@gmail.com> on 2012/11/01 05:59:11 UTC

Sheet instances not being disposed of correctly?

Hi all,

I have run into a problem recently where my application is running out of
heap space (which I have temporarily fixed by increasing the max heap
size), and after performing some profiling I've found that whenever I close
subclasses of Sheet, they are not disposed (even after manually running the
garbage collector). I've debugged the code, and it looks like the line

Vote vote = sheetStateListeners.previewSheetClose(this, result);

always returns Vote.DEFER. Is there something I need to do to ensure I
don't have these memory leaks?

Many thanks,

Joseph.

Re: Sheet instances not being disposed of correctly?

Posted by Joseph Paterson <jo...@gmail.com>.
Hi Roger,

I'm attaching a screenshot taken from VisualVM showing the contents of one
of these Sheets. From the References tab there seems to be nothing external
to Pivot that references my Sheet, but something there might catch your
attention. All instances of that sheet were closed using the close() method
on Sheet, and I manually ran the garbage collector before doing the thread
dump. I'll file a JIRA when I'm 100% convinced this is a Pivot issue and
not one on my end :)

[image: Inline images 1]


Thanks in advance for any help you can provide!

Joseph.

On 2 November 2012 04:17, Roger and Beth Whitcomb <
RogerandBeth@rbwhitcomb.com> wrote:

> Hi Joseph,
>     My recollection (and I haven't looked at the code in detail lately) is
> that the listener returns Vote.DEFER until the closing animation finishes,
> at which time it returns Vote.APPROVE.  So, maybe something is blocking the
> animation from completing?  Or is there something in your code (another
> list somewhere) that is keeping a reference to the Sheets you create?  I
> will look to see if there is something obvious that is keeping another
> reference to the Sheet in a list somewhere too.
>     Do you know from the profiler exactly what kind of object is not being
> freed?  Is it a Sheet or the TerraSheetSkin?
>     Can you file a JIRA issue about this, please, so we can track it (
> https://issues.apache.org/**jira/browse/PIVOT<https://issues.apache.org/jira/browse/PIVOT>
> ).
>
> Thanks,
> ~Roger Whitcomb
>

Re: Sheet instances not being disposed of correctly?

Posted by Roger and Beth Whitcomb <Ro...@rbwhitcomb.com>.
Hi Joseph,
     My recollection (and I haven't looked at the code in detail lately) 
is that the listener returns Vote.DEFER until the closing animation 
finishes, at which time it returns Vote.APPROVE.  So, maybe something is 
blocking the animation from completing?  Or is there something in your 
code (another list somewhere) that is keeping a reference to the Sheets 
you create?  I will look to see if there is something obvious that is 
keeping another reference to the Sheet in a list somewhere too.
     Do you know from the profiler exactly what kind of object is not 
being freed?  Is it a Sheet or the TerraSheetSkin?
     Can you file a JIRA issue about this, please, so we can track it 
(https://issues.apache.org/jira/browse/PIVOT).

Thanks,
~Roger Whitcomb