Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Nebula » PGroup leak problem(PGroup doesn't dispose resources it takes.)
PGroup leak problem [message #501201] Tue, 01 December 2009 09:21 Go to next message
David Crecente is currently offline David Crecente
Messages: 18
Registered: July 2009
Junior Member
Hi all,
I've been using the sleak tool to debug my application and I've seen that PGroup is leaking Color objects.

In my application there are a lot of PGroup and they are disposed and created again and again depending on the interaction of the user.

The number of resources grow very fast because of PGroup doesn't free these resources and I have no control to avoid this behaviour.
Sleak warn me with the next trace:

at org.eclipse.swt.graphics.Device.new_Object(Device.java:853)
at org.eclipse.swt.graphics.Resource.init(Resource.java:85)
at org.eclipse.swt.graphics.Color.<init>(Color.java:112)
at org.eclipse.nebula.widgets.pgroup.RectangleGroupStrategy.ini tialize(RectangleGroupStrategy.java:85)
at org.eclipse.nebula.widgets.pgroup.PGroup.<init>(PGroup.java:123)
at es.myproject.cliente.ui.util.FactoriaComponentes.crearPGr oup(FactoriaComponentes.java:195)


Could someone tell me how I can free the resources a PGroup has caught?

Thank you in advance.

[Updated on: Tue, 01 December 2009 11:17]

Report message to a moderator

Re: PGroup leak problem [message #501220 is a reply to message #501201] Tue, 01 December 2009 10:02 Go to previous messageGo to next message
Matthew Hall is currently offline Matthew Hall
Messages: 368
Registered: July 2009
Senior Member
David Crecente wrote:
> Hi all,
> I've been using the sleak tool to debug my application and I've seen
> that PGroup is leaking Color objects.
>
> In my application there are a lot of PGroup and they are disposed and
> created again and again depending on the interaction of the user.
>
> The number of resources grow very fast because of PGroup doesn't free
> these resources and I have no control to avoid this behaviour.
> Sleak warn me with the next trace:

That's a bug that should be fixed in PGroup directly. Would you file a
Bugzilla report?

https://bugs.eclipse.org/bugs/enter_bug.cgi?classification=T echnology&product=Nebula&component=PGroup

Just copy and paste your description from this thread into the bug, it's
perfect.

Matthew
Re: PGroup leak problem [message #501791 is a reply to message #501220] Thu, 03 December 2009 14:29 Go to previous messageGo to next message
Marty Jones is currently offline Marty Jones
Messages: 54
Registered: July 2009
Member
I have applied a fix to the RectangleGroupStrategy class to remove the "initialBackground" color. You can download the latest code from cvs or pickup the nightly build tomorrow morning.

Just for reference, here is a link to the bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=296582

Marty
Re: PGroup leak problem [message #598751 is a reply to message #501220] Thu, 03 December 2009 14:29 Go to previous message
Marty Jones is currently offline Marty Jones
Messages: 54
Registered: July 2009
Member
I have applied a fix to the RectangleGroupStrategy class to remove the "initialBackground" color. You can download the latest code from cvs or pickup the nightly build tomorrow morning.

Just for reference, here is a link to the bug:

https://bugs.eclipse.org/bugs/show_bug.cgi?id=296582

Marty
Previous Topic:PGroup leak problem
Next Topic:NumberFormat ter and zero
Goto Forum:
  


Current Time: Mon Jul 28 12:35:26 EDT 2014

Powered by FUDForum. Page generated in 0.03825 seconds