Created
November 5, 2020 21:48
-
-
Save yusirdemir/8b696803d09bbd0c3a4bdc94d9980450 to your computer and use it in GitHub Desktop.
Lazy Singleton
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class NetworkService { | |
static NetworkService _instace; | |
static NetworkService get instance { | |
if (_instace == null) _instace = NetworkService._init(); | |
return _instace; | |
} | |
NetworkService._init(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment