avatar
SWT programming questions# Java - 爪哇娇娃
c*t
1
I am working on an XML to SWT tool, similar to CookSwing I posted a few
days ago.
Questions 1:
How do you figure out if a Color can be disposed? According to apidoc,
system color must not be disposed...
Question 2:
Are child widgets disposed when the container (like Display, Shell, etc)
are disposed?
Question 3:
Are fonts/colors disposed automatically when the widget using them
gets disposed (assume no sharing)? Or should I attach a DisposeListener
to the widget that explicitly free the resour
avatar
m*t
2

I think only the creator of a Color is responsible for disposing it,
and then the creator would naturally know if it's a system color...
I think so.
My understanding is that's true, but then the doc on that is pretty
vague...

【在 c*****t 的大作中提到】
: I am working on an XML to SWT tool, similar to CookSwing I posted a few
: days ago.
: Questions 1:
: How do you figure out if a Color can be disposed? According to apidoc,
: system color must not be disposed...
: Question 2:
: Are child widgets disposed when the container (like Display, Shell, etc)
: are disposed?
: Question 3:
: Are fonts/colors disposed automatically when the widget using them

相关阅读
logo
联系我们隐私协议©2024 redian.news
Redian新闻
Redian.news刊载任何文章,不代表同意其说法或描述,仅为提供更多信息,也不构成任何建议。文章信息的合法性及真实性由其作者负责,与Redian.news及其运营公司无关。欢迎投稿,如发现稿件侵权,或作者不愿在本网发表文章,请版权拥有者通知本网处理。