Is singleton available across different applications?

I am wondering: if I create a singleton class with a private constructor and one static method that will return an instance of this class and I put it in the assembly, what happens if I get this instance from two different applications?

Do applications always use the same Singleton instance?

And if both of these programs are unloaded from memory, will the instance also be freed?

Thank.

+5
source share
4 answers

, . , , , .

same, , Singleton .

+8

, , .

+2

Singleton , , , .

,

+2

, , / .

+1

All Articles