Action Listeners - Java

Soldato
Joined
20 Jun 2005
Posts
3,826
Location
London..
Hey guys.

I was just wondering, are nested action listeners in java frowned upon in terms of good programming practice?
 
No, they're fine as long as you're careful.

It's possible to run into issues with memory not being claimed by GC because you have a reference to 'dead' objects within a listener which should've been removed from something but can't as you don't have a direct reference to it.
 
Thanks, I was mostly worried because it just made the code look really messy, and rather inefficient?
 
Back
Top Bottom