StrictMode InstanceCountViolation on honeycomb
<p>Hello i am developing on android 3.2 and have an activity where i use an asynctask to do an sql query on the worker thread and then populate a listview on the UI thread.
Somehow sometimes i get</p>

<pre><code>06-20 15:25:00.270: E/StrictMode(6353): class com.abc.activity.ElencoOrdiniActivity; instances=2; limit=1
06-20 15:25:00.270: E/StrictMode(6353): android.os.StrictMode$InstanceCountViolation: class com.abc.activity.ElencoOrdiniActivity; instances=2; limit=1
06-20 15:25:00.270: E/StrictMode(6353):     at android.os.StrictMode.setClassInstanceLimit(StrictMode.java:1)
</code></pre>

<p>is it my fault ? the async task doesn't hold on to the context, but uses MyActivity.this</p>

<p>here is the code</p>

<pre><code>    AsyncTask&lt;Void, Void, List&lt;JSONArray&gt;&gt; async = new AsyncTask&lt;Void, Void, List&lt;JSONArray&gt;&gt;()
    {

        @Override
        protected List&lt;JSONArray&gt; doInBackground(Void... params) {



            MyApp appState = ((MyApp)getApplicationContext());


            cursor_ordini = getHelper().getReadableDatabase().rawQuery("...");
            cursor_ordini.moveToFirst();

            List&lt;JSONArray&gt; ordini = new Vector&lt;JSONArray&gt;();
            if (cursor_ordini.getCount() &gt; 0)
            {
                ....
                return ordini;

            }
            return null;
        }

        @Override
        protected void onPostExecute(List&lt;JSONArray&gt; ordini) {
            super.onPostExecute(ordini);

            MyApp appState = ((MyApp)getApplicationContext());


            ListView listView = (ListView) ElencoOrdiniActivity.this.findViewById(R.id.listView_elenco_ordini);
            listView.setAdapter( new OrdiniAdapter(ElencoOrdiniActivity.this, R.layout.elenco_ordini_instestazione, ordini));
            listView.setOnScrollListener( new EndlessOrdiniScrollListener(ElencoOrdiniActivity.this, appState.getDittaIdSelezionata(), "") );

        }

    };

    async.execute();
</code></pre>
