Static Context Saved In Application Class And Used In A Singleton Toast Builder, Does This Create A Memory Leak?
I've got a singleton Toast-showing class, which keeps track of the current toast and cancels it when it is started again: public enum SingleToast { INSTANCE; private Toast
Solution 1:
First No, if you save context only in Application, as described above, it will not cause memory leak.
About second, It is almost the same to first case, but first is more simple in implementation than second.
Post a Comment for "Static Context Saved In Application Class And Used In A Singleton Toast Builder, Does This Create A Memory Leak?"