Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » Is it mandatory to call dispose method on a widget(as in rcp it mandatory to dispose everything you have requested from the operating system, but in rap)
Is it mandatory to call dispose method on a widget [message #555528] Fri, 27 August 2010 03:10 Go to next message
lsq  is currently offline lsq Friend
Messages: 40
Registered: July 2009
Member
Hi all,
As in rcp platform, it is mandatory to dispose everything you have created whenever possible. As there is nothing like system handlers, do I still have to call dispose method on widgets for example context menu. Can I simply dereference and leave it for garbage collections, as system resource like font, color and image are no longer disposable, which means you don't have to dispose widgets like context menu (even though dispose method is available)?

Thanks in advance.
Re: Is it mandatory to call dispose method on a widget [message #555566 is a reply to message #555528] Fri, 27 August 2010 08:08 Go to previous message
Ivan Furnadjiev is currently offline Ivan FurnadjievFriend
Messages: 2426
Registered: July 2009
Location: Sofia, Bulgaria
Senior Member
Hi lsq,

you have to dispose your resources/widgets in RAP too. With current RAP
CVS HEAD (1.4M1) system resource like font, color and image are
disposable if they are not factory created. We have plan to deprecate
some Graphics#getXXX soon. See bug
320928: Deprecate Graphics#getXXX methods?
https://bugs.eclipse.org/bugs/show_bug.cgi?id=320928
This will improve the single-sourcing. You need to dispose your widgets
too, as we have to release (dispose) the corresponding client-side
(javascript) widgets.

HTH,
Ivan

On 08/27/2010 6:10 AM, lsq wrote:
> Hi all,
> As in rcp platform, it is mandatory to dispose everything you have
> created whenever possible. As there is nothing like system handlers,
> do I still have to call dispose method on widgets for example context
> menu. Can I simply dereference and leave it for garbage collections,
> as system resource like font, color and image are no longer
> disposable, which means you don't have to dispose widgets like context
> menu (even though dispose method is available)?
>
> Thanks in advance.
Previous Topic:How to create a custom RAP interface backed by EMF
Next Topic:Toolbar item's not visible in addition menu (>>) of toolbar
Goto Forum:
  


Current Time: Fri Apr 19 02:05:40 GMT 2024

Powered by FUDForum. Page generated in 0.02861 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top