Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [platform-swt-dev] Resource should be disposed by the thread that creates it???


There are times when generating a thumbnail/preview Image on a background thread is useful.  This only requires accessing resources, but I thought creating and disposing them should work too.

-randy



Silenio Quarti <Silenio_Quarti@xxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx

10/22/2004 10:14 AM

Please respond to
platform-swt-dev

To
platform-swt-dev@xxxxxxxxxxx
cc
platform-swt-dev@xxxxxxxxxxx, platform-swt-dev-admin@xxxxxxxxxxx
Subject
Re: [platform-swt-dev] Resource should be disposed by the thread that creates it???





You should create and dispose resources in the UI thread. This is not
enforced,
but I believe it is the best practice.

Silenio




Cheng Mo <w21009@xxxxxxxxxxxx>
Sent by: platform-swt-dev-admin@xxxxxxxxxxx
10/22/2004 02:22 AM
Please respond to
platform-swt-dev


To
platform-swt-dev@xxxxxxxxxxx
cc

Subject
[platform-swt-dev] Resource should be disposed by the thread that creates
it???






Several days ago, I asked one question in this maillist about magical
dead of Color#dispose() & Image#dispose().

In platform gtk2.2.0 + swt3038 ( Redhat Linux 7.2), if one Color/Image
is created in one Thread(Thread A), and it is disposed in another
Thread(Thread B). It is quite possible that when this Color/Image is
disposed. the dispose() call will end in dead.

Is it a rule that resource should be disposed by the thread that creates
it?




_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev


_______________________________________________
platform-swt-dev mailing list
platform-swt-dev@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/platform-swt-dev


Back to the top