Yes. A Singleton lives the life of your application. If you want it to live longer you would need to serialize it -- as well as provide an interface that serializes the object when apps that use it are closed as well as an interface that de-serializes and re-instantiates (?) it into RAM whenever it is requested. What a horrible mess that will be. :) I can't think of a reason why I would a Singleton that lives past the life on an app, but if it can be done then surely it solves some problem*.
*I think this is a stretch -- but in some ways the session attached to a user in a web app might qualify as such a singleton ... sort of.
jeffa
L-LL-L--L-LL-L--L-LL-L-- -R--R-RR-R--R-RR-R--R-RR B--B--B--B--B--B--B--B-- H---H---H---H---H---H--- (the triplet paradiddle with high-hat)
In reply to Re: what is the real scope of a singleton
by jeffa
in thread what is the real scope of a singleton
by leocharre
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |