Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Caution : Repository is Singleton #67

Open
ashish-andev opened this issue Oct 30, 2019 · 1 comment
Open

Caution : Repository is Singleton #67

ashish-andev opened this issue Oct 30, 2019 · 1 comment

Comments

@ashish-andev
Copy link

ashish-andev commented Oct 30, 2019

AppDataManager is a singleton.
Is it recommended to keep your Repository class as Singleton?

@amitshekhariitbhu
Copy link
Contributor

amitshekhariitbhu commented Oct 30, 2019

@ashish-andev It depends on the use-case like:

  • How frequently we are going to use that object?
  • How much resource is needed to create the object of that class?
  • What is the scope/lifetime of that object?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants