Skip to content

Instantly share code, notes, and snippets.

@agustarc
Last active December 22, 2016 12:24
Show Gist options
  • Save agustarc/5ba8a8b8b6b3c644bd97bc749b59b8ab to your computer and use it in GitHub Desktop.
Save agustarc/5ba8a8b8b6b3c644bd97bc749b59b8ab to your computer and use it in GitHub Desktop.
public class LeakActivity extends Activity {
private final Handler handler = new Handler() {
@Override
public void handleMessage(Message msg) {
// do work
}
}
@Override
protected void onCreate(Bundle savedInstanceState) {
super.onCreate(savedInstanceState);
handler.postDelayed(new Runnable() {
@Override
public void run() {}
}, 60000);
finish();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment