Code example for WeakReference

Methods: clearget

0
		} 
 
		@Override 
		protected void onPostExecute(Boolean result) {
			if (result == false) {
				ref.get().showDialog(3);
			} 
			else { 
				ref.get().showDialog(2);
			} 
			 
			detach(); 
		} 
 
		public void attach(SignupActivity a) {
			ref = new WeakReference<SignupActivity>(a);
		} 
 
		public void detach() { 
			ref.clear();
		} 
	} 
 
 
	@Override 
Connect your IDE to all the code out there  Get Codota for Java