Skip to content

Instantly share code, notes, and snippets.

@kmdupr33
Created July 9, 2015 19:03
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 1 You must be signed in to fork a gist
  • Save kmdupr33/e9af62a0ad04abbb0a7d to your computer and use it in GitHub Desktop.
Save kmdupr33/e9af62a0ad04abbb0a7d to your computer and use it in GitHub Desktop.
Showing the terrible practice of having a static reference to a context
public class MainActivity extends LocationManagingActivity implements ActionBar.OnNavigationListener,
GooglePlayServicesClient.ConnectionCallbacks,
GooglePlayServicesClient.OnConnectionFailedListener {
//...
private static MeTrackerStore mMeTrackerStore;
//...
@Override
protected void onCreate(Bundle savedInstanceState) {
//...
mMeTrackerStore = new MeTrackerStore(this);
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment