Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

This Handler class should be static or leaks might occur: Handler #21

Open
alexeyvasilyev opened this issue Apr 29, 2015 · 0 comments
Open

Comments

@alexeyvasilyev
Copy link

I'm getting this warning in Android Studio 1.1 for the code in PreferenceFragment.java

private Handler mHandler = new Handler() {
    @Override
    public void handleMessage(Message msg) {
        switch (msg.what) {

            case MSG_BIND_PREFERENCES:
                bindPreferences();
                break;
        }
    }
};

More info how it can be fixed.
http://stackoverflow.com/questions/11407943/this-handler-class-should-be-static-or-leaks-might-occur-incominghandler

@alexeyvasilyev alexeyvasilyev changed the title This Handler class should be static or leaks might occur: IncomingHandler This Handler class should be static or leaks might occur: Handler Apr 29, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant