Tag interface for singletons

8 views
Skip to first unread message

John O'Hanley

unread,
Aug 28, 2009, 7:17:25 PM8/28/09
to javapractices-dot-com-discuss
Tag Interface for Singletons - what do you think?

Singletons are often important classes. They are also a fruitful
source of memory leaks. It may be beneficial to create a simple tag
interface for identifying all the singletons in your code. Given
modern IDEs, this would make it easy to find all the singletons in
your project. In addition, it is also more explicit. The 'singleton-
ness' is an important aspect of a class, and should be expressed in
some explicit manner in the actual code.

Any thoughts?

- John
Reply all
Reply to author
Forward
0 new messages