I suspect this didn't actually follow the Singleton pattern 100% due to nulling it out - but clearInstance() was more of a way to get rid of the instance entirely, ensuring that a reinitialized fresh instance would be provided next time getInstance() was called
01/23/2017, 11:12 PM
morris86: What’s your usecase for needing a new instance? Seems like that very much isn’t a singleton.
01/23/2017, 11:14 PM
indeed, that's why I said I guess it's not exactly a Singleton, because there can be a different instance of it throughout the application's lifecycle.. but there can only ever be one at a time
01/23/2017, 11:17 PM
What’s the usecase?
01/23/2017, 11:21 PM
a request queue of sorts. normally I'd use dagger for this sort of thing, but this is not purely my application. I'm just looking to re-write parts of it in Kotlin for my own learning purposes