Creating a Single Instance

I’ve used singletons previously while they were experimental, but I see that a new experiment has been implemented in Beta 40 called Single Instance as a replacement, but there isn’t any documentation on how it works.

A little example would be very handy!


This could be helpful:

1 Like

For singleton to work you create a wrapper static class witch should return new instance of your class if there no instance and return that instance if there is one, then you can add this class anywhere you want and you will have that instance everywhere.

I think the store factory is another method that even better

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.