@Override
    protected void onDetachedFromWindow() {
        super.onDetachedFromWindow();

        //clear image cache
        this.imageLoader.clear();
    }
registers the activity associated with this gallery for image transtions towards image detail view
main/src/main/java/cgeo/geocaching/ui/ImageGalleryView.java