Hey folks, trying to understand if there could be ...
# android
s
Hey folks, trying to understand if there could be a possible memory leakage in this case. I have created a SingletonClass with private members, one of the private member is another class which then holds reference of repositories etc. So now since, there is a singleton instance of my class, which further has strong reference to other member classes, can there be any scare of
memory leakage
?
g
memory leak = when something is still present in memory but will not be used anymore, so it's dependent of your usage. If you use all the repositories on all the pages of your app, it's not a leak. If it's not the case, then you're definitely keeping too much in memory.
s
I mean, I am creating a SDK and trying to implement a manual DI and it will retain all the repositories, and provide whichever is needed to whatever class needs them. Thats why i am a bit conflicted.