Skip to main content



      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] Thu, 26 August 2010 23:10 Go to next message
Eclipse UserFriend
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 04:08 Go to previous message
Eclipse UserFriend
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: Sun Oct 12 09:17:20 EDT 2025

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

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

Back to the top