0

What is the difference between Windows invalidate and detach?

asked 2011-05-31 04:07:40 +0800

ZKApp gravatar image ZKApp
18

Can anyone tell me the differences between Windows.detach() and Windows.invalidate(). Which method should be used to forcibly make the component eligible for Garbage Collection?

Thanks

delete flag offensive retag edit

4 Replies

Sort by ยป oldest newest

answered 2011-05-31 05:25:46 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

updated 2011-05-31 05:26:53 +0800

.invalidate() -> forces to refresh/reDraw/rePaint the component.
.detach -> cut the component from the page, so it's not more in the DOM and can be free.

link publish delete flag offensive edit

answered 2011-05-31 06:46:08 +0800

ZKApp gravatar image ZKApp
18

Thanks. So if we detach the window, will all the components under that window will be the candidate for garbage collection?

link publish delete flag offensive edit

answered 2011-05-31 12:44:30 +0800

terrytornado gravatar image terrytornado flag of Germany
9393 3 7 16
http://www.oxitec.de/

jepp

link publish delete flag offensive edit

answered 2012-03-27 12:32:37 +0800

javaenthu gravatar image javaenthu
141 2

updated 2012-03-27 12:33:11 +0800

@Terry:
Can you pl. check this : and guide me please if you can :)

link publish delete flag offensive edit
Your reply
Please start posting your answer anonymously - your answer will be saved within the current session and published after you log in or create a new account. Please try to give a substantial answer, for discussions, please use comments and please do remember to vote (after you log in)!

[hide preview]

Question tools

Follow

RSS

Stats

Asked: 2011-05-31 04:07:40 +0800

Seen: 604 times

Last updated: Mar 27 '12

Support Options
  • Email Support
  • Training
  • Consulting
  • Outsourcing
Learn More