thedevstop / asfac

A simple, fast IOC container for use in ActionScript projects
MIT License
0 stars 0 forks source link

True singletons #8

Closed JoeRobich closed 12 years ago

JoeRobich commented 12 years ago

Added tests around registering a type as a singleton multiple times, in multiple scopes, and in multiple factories. Ensures that once registered the same singleton will be used for the life of the application across all factories and scopes.

JoeRobich commented 12 years ago

It was decided that the proper behavior was for each registration to be its own instance. If a "global" singleton was wanted then the user would register the same instance for each Type.