when I implement the handler I get warning
' This Handler class should be static or leaks might occur '
Because above warning I defined the handler as a static class.
below is after modify.
public static Handler _handler = new Handler() {
@Override
public void handleMessage(Message msg) {
Bundle bundle = msg.getData();
.
.
.
super.handleMessage(msg);
}
};
Now my this Handler will receive messages from many threads. So I want to know is it OK to define this handler as a static? Handler keep the all the receiving messages in a queue and process one by one without missing anything ?