ParkSangGwon / TedPermission

Easy check permission library for Android Marshmallow
1.74k stars 239 forks source link

Memory leak warning in Android Studio. #36

Closed isabsent closed 7 years ago

isabsent commented 7 years ago

If you load your code in AS this warning appears:

Do not place Android context classes in static fields (static reference to TedInstance which has field context pointing to Context); 
this is a memory leak (and also breaks Instant Run).  A static field will leak contexts.

ted_permission_memory_leak

Is there a way to avoid memory leaks using your library?

ParkSangGwon commented 7 years ago

@isabsent I removed static field TedInstance You can user this code at v1.0.3