Forbidden actions - michaelspiss/singleton GitHub Wiki

Constructors with arguments

Even though this is not an action, this might be the most important one. Singletons cannot take arguments, because then they would be factories. To work around this issue, read "constructors for singletons".

Cloning

This is pretty self-explanatory, isn't it? If you clone a singleton, it is not a singleton anymore and thus this action is forbidden.

Unserialization

During serialization the state of the singleton is saved. Unserialization means that you restore this saved instance. This could result in two singleton objects and is why this action is forbidden as well.