Skip to main content



      Home
Home » Eclipse Projects » Remote Application Platform (RAP) » SWT manual resource disposal(Memory Management)
SWT manual resource disposal [message #1799245] Mon, 03 December 2018 08:17 Go to next message
Eclipse UserFriend
Hi,

found this:

"SWT widgets hold a reference to the native widget. Such references are not automatically released by the system. If you want to release an SWT widget, you have to call its dispose() method. If a container is disposed, e.g., a Shell, this container also releases all its children.

The automatic release does not work for Color, Cursor, Display, Font, GC, Image, Printer, Region, Widget and subclasses. All of these SWT objects need to be manually disposed."

on
vogella.com/tutorials/SWT/article.html#memory-management

I was wondering if the manual disposal is also needed to be done in RAP?

Thanks,

Sebastian
Re: SWT manual resource disposal [message #1799275 is a reply to message #1799245] Mon, 03 December 2018 14:38 Go to previous messageGo to next message
Eclipse UserFriend
You should. It's the only way to release the resources.
If you don't dispose a control. it will stay a child of its parent.
If you don't dispose a shell it will stay a child of its display.
The objects will never get garbage collected until the display is disposed. They will continue to use memory on the server and in the browser.
Re: SWT manual resource disposal [message #1799565 is a reply to message #1799275] Mon, 10 December 2018 06:35 Go to previous message
Eclipse UserFriend
Thanks

[Updated on: Mon, 10 December 2018 06:36] by Moderator

Previous Topic:Browser with PDF hides RAP combo drop-down
Next Topic:Strange behaviour for selectAll
Goto Forum:
  


Current Time: Sat Jul 12 13:56:09 EDT 2025

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

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

Back to the top