AsyncTask not stopping while loading images.
<p>This is my AsyncTask, called from getView of an adapter:</p>

<pre><code>class LoadImage extends AsyncTask&lt;Object,Void,String&gt;{

        private ImageView imv;
        private String path;

         public LoadImage(ImageView imv) {
             this.imv = imv;

        }

         Bitmap userAvatarStream = null ;
            Bitmap IconStream = null;
            URL IconURL;

            ProgressDialog dialog;
            @Override
                protected void onPreExecute(){
                    //Setting all the variables by getting the ids from the layout


                return;

                }


                @Override
                protected String doInBackground(Object... params) {

                    try {
                        IconURL = new URL(cr.ImageUrl);
                        IconStream = BitmapFactory.decodeStream(IconURL.openConnection().getInputStream());


                    }

                    catch (MalformedURLException e){
                        e.printStackTrace();
                    }
                    catch (IOException e) {
                        // TODO Auto-generated catch block
                        e.printStackTrace();
                    }
                    return null;
                }


                 protected void onPostExecute(String result){
                        // ImageView user_avatar = (ImageView)v.findViewById(R.id.follower_user_avatar);

                    imv.setImageBitmap(IconStream);


                         return;


                }
</code></pre>

<p>The problem that I get here is that the images keep loading. Lets say I scroll down and the images go away to be refreshed again if I scroll up the list. It keeps making calls to get the images. This behaviour is obviously undesirable except at one place that if the internet on your cell-phone goes down and comes up again, this would help to auto-load the images. But, in the current state even that is crashing as it keeps making calls. How to stop AsyncTask from doing that? </p>
