Code example for WeakReference

Methods: clear

0
		public void attach(PlaceInfoActivity a) {
			ref = new WeakReference<PlaceInfoActivity>(a);
		} 
 
		public void detach() { 
			ref.clear();
		} 
	} 
 
	@Override 
	protected boolean isRouteDisplayed() { 
		// TODO Auto-generated method stub 
		return false; 
	} 
 
	private class MyItemizedOverlay extends BalloonItemizedOverlay<OverlayItem> { 
		private List<OverlayItem> overlays = new ArrayList<OverlayItem>();
		private List<Place> placeInformations = new ArrayList<Place>();
 
		public MyItemizedOverlay(Drawable defaultMarker, MapView mapView) {
			super(boundCenter(defaultMarker), mapView);