Skip to content

Instantly share code, notes, and snippets.

@kmdupr33
Last active February 19, 2016 10:21
Show Gist options
  • Save kmdupr33/ef8023275ca36d201360 to your computer and use it in GitHub Desktop.
Save kmdupr33/ef8023275ca36d201360 to your computer and use it in GitHub Desktop.
Shows how Subscribers can leak
public class MainActivity extends ActionBarActivity implements View.OnClickListener {
@Override
public void onClick(View v) {
mApiService.submitCredentials(mCredentials)
.subscribe(new Subscriber<RegistrationResponse>() {
@Override
public void onCompleted() {
showSuccessfulLogin();
}
@Override
public void onError(Throwable e) {
}
@Override
public void onNext(RegistrationResponse registrationResponse) {
}
});
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment