AS3: Static class versus Singleton
问题 I know SO pals are not fans of "versus" questions but... even rephrasing the tittle a bit, the versus part is still there, so, why hide it. Basically, I'd like to know when and why should I use a singleton or a static class, what can offer a singleton that a static class cant, and vice versa. For a long time I used both, and I cant see a reason why I shouldn't use one over the other. Thanks. 回答1: Both are basically global variables with caveats. Static classes prevent inheritance, and