| Sign In/My Account | View Cart |
| Article: |
Seven Low-Cost Ways to Improve Legacy Code | |
| Subject: | Replace Listeners with Weak Listeners | |
| Date: | 2004-05-07 15:09:21 | |
| From: | Robert Simmons Jr. (Kraythe) | |
|
Response to: Replace Listeners with Weak Listeners
|
||
|
True. That would not be a good thing. However, I am not a fan of anonymous classes as you read later in the article. I counsider it to be much better to refactor those into inner classes at the very least.
|
||
Showing messages 1 through 1 of 1.
I also don't think that not holding direct references to objects you create isn't always iffy at all. To the contrary: if the object you listen to has a shorter lifetime than the object creating the listener, it's the most elegant solution to make sure that the listener is destroyed as soon as it isn't needed any longer.