Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Remote Application Platform (RAP) » SWT manual resource disposal(Memory Management)
SWT manual resource disposal [message #1799245] Mon, 03 December 2018 13:17 Go to next message
Sebastian Fey is currently offline Sebastian FeyFriend
Messages: 4
Registered: December 2018
Junior Member
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 19:38 Go to previous messageGo to next message
Chris Fairhall is currently offline Chris FairhallFriend
Messages: 221
Registered: February 2011
Senior Member
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 11:35 Go to previous message
Sebastian Fey is currently offline Sebastian FeyFriend
Messages: 4
Registered: December 2018
Junior Member
Thanks

[Updated on: Mon, 10 December 2018 11:36]

Report message to a moderator

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


Current Time: Sun Dec 08 04:51:58 GMT 2019

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

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

Back to the top