Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Standard Widget Toolkit (SWT) » when to dispose of widgets/objects
when to dispose of widgets/objects [message #444276] Mon, 11 October 2004 07:51 Go to next message
Eclipse UserFriend
Originally posted by: spam.scientifik.com

From what I've read, I'll have to dispose of SWT widgets manually as they
are calls to native resources.

When should I dispose of widgets and are there other resources I need to
be disposing of manually?
Re: when to dispose of widgets/objects [message #444283 is a reply to message #444276] Mon, 11 October 2004 09:56 Go to previous messageGo to next message
Grant Slender is currently offline Grant SlenderFriend
Messages: 14
Registered: July 2009
Junior Member
Widget attached to a parent widget (like a composite/shell) will dispose its
children when it is disposed.

So when you dispose the shell, all widgets contained in it will be
disposed - so you don't have to dispose anything.

You only need to dispose of resource you create yourself, like Fonts and
such.

Grant

"V. Jenks" <spam@scientifik.com> wrote in message
news:ckde2l$6f6$1@eclipse.org...
> From what I've read, I'll have to dispose of SWT widgets manually as they
> are calls to native resources.
>
> When should I dispose of widgets and are there other resources I need to
> be disposing of manually?
>
Re: when to dispose of widgets/objects [message #444287 is a reply to message #444283] Mon, 11 October 2004 10:10 Go to previous messageGo to next message
Richard Moore is currently offline Richard MooreFriend
Messages: 71
Registered: July 2009
Member
Hi Grant,

What about event listeners, if I have added a selection listener to a combo
then its shell is disposed, I guess the event listener is also canned?

Cheers
Richard

"Grant Slender" <gslender@users.sourceforge.net> wrote in message
news:ckdl2i$mdq$1@eclipse.org...
> Widget attached to a parent widget (like a composite/shell) will dispose
> its children when it is disposed.
>
> So when you dispose the shell, all widgets contained in it will be
> disposed - so you don't have to dispose anything.
>
> You only need to dispose of resource you create yourself, like Fonts and
> such.
>
> Grant
>
> "V. Jenks" <spam@scientifik.com> wrote in message
> news:ckde2l$6f6$1@eclipse.org...
>> From what I've read, I'll have to dispose of SWT widgets manually as they
>> are calls to native resources.
>>
>> When should I dispose of widgets and are there other resources I need to
>> be disposing of manually?
>>
>
>
Re: when to dispose of widgets/objects [message #444292 is a reply to message #444287] Mon, 11 October 2004 13:16 Go to previous messageGo to next message
Grant Slender is currently offline Grant SlenderFriend
Messages: 14
Registered: July 2009
Junior Member
Yes, that is right.

"Richard Moore" <rmoore@infometis.ch> wrote in message
news:ckdlto$o7u$1@eclipse.org...
> Hi Grant,
>
> What about event listeners, if I have added a selection listener to a
> combo then its shell is disposed, I guess the event listener is also
> canned?
>
> Cheers
> Richard
>
> "Grant Slender" <gslender@users.sourceforge.net> wrote in message
> news:ckdl2i$mdq$1@eclipse.org...
>> Widget attached to a parent widget (like a composite/shell) will dispose
>> its children when it is disposed.
>>
>> So when you dispose the shell, all widgets contained in it will be
>> disposed - so you don't have to dispose anything.
>>
>> You only need to dispose of resource you create yourself, like Fonts and
>> such.
>>
>> Grant
>>
>> "V. Jenks" <spam@scientifik.com> wrote in message
>> news:ckde2l$6f6$1@eclipse.org...
>>> From what I've read, I'll have to dispose of SWT widgets manually as
>>> they
>>> are calls to native resources.
>>>
>>> When should I dispose of widgets and are there other resources I need to
>>> be disposing of manually?
>>>
>>
>>
>
Re: when to dispose of widgets/objects [message #444358 is a reply to message #444283] Tue, 12 October 2004 01:18 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: spam.scientifik.com

Great, thank you!

Grant Slender wrote:

> Widget attached to a parent widget (like a composite/shell) will dispose its
> children when it is disposed.

> So when you dispose the shell, all widgets contained in it will be
> disposed - so you don't have to dispose anything.

> You only need to dispose of resource you create yourself, like Fonts and
> such.

> Grant

> "V. Jenks" <spam@scientifik.com> wrote in message
> news:ckde2l$6f6$1@eclipse.org...
> > From what I've read, I'll have to dispose of SWT widgets manually as they
> > are calls to native resources.
> >
> > When should I dispose of widgets and are there other resources I need to
> > be disposing of manually?
> >
Re: when to dispose of widgets/objects [message #444432 is a reply to message #444276] Tue, 12 October 2004 15:58 Go to previous message
Steve Northover is currently offline Steve NorthoverFriend
Messages: 1636
Registered: July 2009
Senior Member
http://eclipse.org/articles/swt-design-2/swt-design-2.html

"V. Jenks" <spam@scientifik.com> wrote in message
news:ckde2l$6f6$1@eclipse.org...
> From what I've read, I'll have to dispose of SWT widgets manually as they
> are calls to native resources.
>
> When should I dispose of widgets and are there other resources I need to
> be disposing of manually?
>
Previous Topic:Resolution Problem
Next Topic:Label Wrap
Goto Forum:
  


Current Time: Tue Oct 27 21:54:08 GMT 2020

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

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

Back to the top