# Static Application Reference - Touchlab

DevFeed: [Static Application Reference - Touchlab](<https://devfeed.tech/articles/static-application-reference-touchlab-38074.md>)

Original publisher: [Read original article](<https://touchlab.co/2013-07-static-application-reference>)

Published: 2013-07-04T06:00:00Z

Content type: opinion

Language: en

Sources: [Touchlab | Enterprise Mobile Innovation & Development](<https://devfeed.tech/sources/touchlab-enterprise-mobile-innovation-development.md>)

Topics: [Android](<https://devfeed.tech/topics/android.md>), [Memory Leaks](<https://devfeed.tech/topics/memory-leaks.md>), [App](<https://devfeed.tech/topics/app.md>), [context](<https://devfeed.tech/topics/context.md>), [Code](<https://devfeed.tech/topics/code.md>)

Tags: [android](<https://devfeed.tech/tags/android.md>), [app](<https://devfeed.tech/tags/app.md>), [code](<https://devfeed.tech/tags/code.md>), [context](<https://devfeed.tech/tags/context.md>), [memory-leaks](<https://devfeed.tech/tags/memory-leaks.md>), [thoughts](<https://devfeed.tech/tags/thoughts.md>)

## AI overview

This commentary examines whether storing an Android Application instance in a static field of a custom Application class is acceptable. It contrasts that approach with storing an Activity Context, which can cause memory problems, and argues that initializing the Application instance in onCreate should avoid the same memory-leak concern, while acknowledging a design objection that the pattern may feel lazy.

## Source excerpt

We did a code "rescue" for a client last year, and the previous consultants had done some some extremely ugly things with the code.