Letter to the Editor(s)

Letter to the Editor(s)

By Jeff Daudel

Overload, 11(58):, December 2003


To the Editor,

There are definitely pros and cons of singleton usage, depending on whether they're used properly or abused. I believe both sides bring valid points to the argument. In modern generic programming, I have experienced great benefits from them.

I have worked on several large-scale projects that have employed a unified singleton system approach. On one such project, we currently have 234 singleton instances. These include such things as specific program state and task objects. The dependencies and life-time issue for all 234 instances are automatically handled for us. We can easily add, and change these instances without fear of a system breakage. It's similar to a free high-performance garbage collection at the architectural level.

Prior to working on such large-scale frameworks without such a system, maintenance work has been a nightmare, even for the outstandingly talented developers. The alleviation has done wonders for preventing memory leaks and keeping our project shutting down properly. For anyone that is interested in this architectural technique, all the necessary code is available. I've posted an article that shows a simple example of how to use a unified singleton system: http://daudel.org/code/singleton_usage.html (will post soon)






Your Privacy

By clicking "Accept Non-Essential Cookies" you agree ACCU can store non-essential cookies on your device and disclose information in accordance with our Privacy Policy and Cookie Policy.

Current Setting: Non-Essential Cookies REJECTED


By clicking "Include Third Party Content" you agree ACCU can forward your IP address to third-party sites (such as YouTube) to enhance the information presented on this site, and that third-party sites may store cookies on your device.

Current Setting: Third Party Content EXCLUDED



Settings can be changed at any time from the Cookie Policy page.