Skip to content

Instantly share code, notes, and snippets.

@moea
Created April 19, 2013 11:21
Show Gist options
  • Save moea/5419751 to your computer and use it in GitHub Desktop.
Save moea/5419751 to your computer and use it in GitHub Desktop.
findViewById(R.id.btn_dump_heap).setOnClickListener(
new View.OnClickListener() {
@Override
public void onClick(View v) {
File destination = new File(getApplicationInfo().dataDir, "MyApp.dalvik-hprof");
try {
Debug.dumpHprofData(destination.getAbsolutePath());
} catch (IOException e) {
e.printStackTrace();
}
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment