# Handling configuration changes using static references

DevFeed: [Handling configuration changes using static references](<https://devfeed.tech/articles/handling-configuration-changes-using-static-references-39025.md>)

Original publisher: [Read original article](<https://vladimirj.dev/handling-configuration-changes/>)

Author: Vladimir Jovanović

Published: 2017-10-09T10:44:00Z

Content type: tutorial

Language: en

Sources: [Vladimir Jovanović](<https://devfeed.tech/sources/vladimir-jovanovic.md>)

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

Tags: [android](<https://devfeed.tech/tags/android.md>), [android-app-development](<https://devfeed.tech/tags/android-app-development.md>), [application](<https://devfeed.tech/tags/application.md>), [configuration](<https://devfeed.tech/tags/configuration.md>), [crash](<https://devfeed.tech/tags/crash.md>), [leakcanary](<https://devfeed.tech/tags/leakcanary.md>), [memory](<https://devfeed.tech/tags/memory.md>), [memory-leak](<https://devfeed.tech/tags/memory-leak.md>), [memory-management](<https://devfeed.tech/tags/memory-management.md>), [os](<https://devfeed.tech/tags/os.md>), [rotation](<https://devfeed.tech/tags/rotation.md>)

## AI overview

This Android article explains why using static references to preserve data across Activity configuration changes is unsafe. Such references can prevent the operating system from reclaiming memory, eventually causing the application to be killed and crash.

## Source excerpt

What if you hold a static reference to the data in my Activity to preserve them on screen rotation? Why is that bad?