6

I have used some Handlers like

           new Handler(Looper.getMainLooper()).post(new Runnable() {

            @Override
            public void run() {
                try{
                    Messages.onAcknowledgeReceived();                                       

                }catch(Exception e){
                    e.printStackTrace();
                }

                }
            }); 

It executes in each 15 seconds and after sometimes it started throwing some warnings like

 The Looper class instance count has over a limit(100). There should be some leakage of Looper or HandlerThread.
 12-16 12:16:11.357: E/Looper(4647): Looper class instance count = 221
 12-16 12:16:11.357: E/Looper(4647): Current Thread Name: IntentService[AppService]
 12-16 12:16:12.316: E/Looper(4647): WARNING: The Looper class instance count has over a   limit(100). There should be some leakage of Looper or HandlerThread.
 12-16 12:16:12.318: E/Looper(4647): Looper class instance count = 222
 12-16 12:16:12.318: E/Looper(4647): Current Thread Name: IntentService[GCMIntentService-419284807656-203]

Is there any wrong in my programming approach ? I still not understand where is the leakage in this bit of code.

JJJ
  • 32,902
  • 20
  • 89
  • 102
Ranjit
  • 5,130
  • 3
  • 30
  • 66

0 Answers0