# trello-archive/rxlifecycle

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/trello-archive-rxlifecycle).**

7,651 stars · 636 forks · Java · Apache-2.0

## Links

- GitHub: https://github.com/trello-archive/RxLifecycle
- awesome-repositories: https://awesome-repositories.com/repository/trello-archive-rxlifecycle.md

## Description

RxLifecycle is a lifecycle management library for RxJava that binds observable streams to Android component lifecycles. It functions as a reactive stream lifecycle wrapper and a memory leak prevention tool by automatically terminating asynchronous sequences when activities or fragments are destroyed.

The library integrates RxJava with Android lifecycle states to ensure that resource management is handled automatically. It prevents memory leaks by disconnecting streams and disposing of subscriptions when a component reaches a specific lifecycle state.

The project covers the domain of Android reactive programming and memory management, providing mechanisms for lifecycle-aware stream binding and observer-based tracking to handle the teardown of asynchronous data streams.

## Tags

### Software Engineering & Architecture

- [Lifecycle-Scoped Stream Subscriptions](https://awesome-repositories.com/f/software-engineering-architecture/reactive-state-subscriptions/lifecycle-scoped-stream-subscriptions.md) — Provides lifecycle-scoped stream subscriptions that automatically dispose of RxJava streams when Android components are deactivated.
- [Component Resource Cleanups](https://awesome-repositories.com/f/software-engineering-architecture/component-resource-cleanups.md) — Implements patterns for canceling asynchronous operations and releasing resources when UI components are destroyed.
- [Reactive Stream Lifecycles](https://awesome-repositories.com/f/software-engineering-architecture/control-and-data-flow-decoupling/reactive-stream-lifecycles.md) — Provides a reactive stream lifecycle wrapper to manage the termination of data emissions based on component states.
- [Android Lifecycle Management](https://awesome-repositories.com/f/software-engineering-architecture/memory-usage-analysis/memory-leak-prevention/android-lifecycle-management.md) — Prevents memory leaks by coordinating RxJava background tasks with Android system state changes.
- [Automatic Subscription Disposals](https://awesome-repositories.com/f/software-engineering-architecture/observer-patterns/disposable-observers/automatic-subscription-disposals.md) — Provides automatic disposal of RxJava subscriptions when Android components are destroyed to prevent memory leaks.
- [Memory Leak Prevention](https://awesome-repositories.com/f/software-engineering-architecture/memory-usage-analysis/memory-leak-prevention.md) — Prevents memory leaks by resolving retained object references within asynchronous reactive streams.
- [Lifecycle Event Observers](https://awesome-repositories.com/f/software-engineering-architecture/observer-patterns/disposable-observers/lifecycle-event-observers.md) — Monitors Android lifecycle events to trigger the timely disposal of observable sequences.

### Data & Databases

- [Stream Lifecycle Managers](https://awesome-repositories.com/f/data-databases/stream-lifecycle-management/stream-lifecycle-managers.md) — Manages the creation and destruction of RxJava stream handles bound to component lifecycles. ([source](https://github.com/trello-archive/rxlifecycle#readme))

### Mobile Development

- [RxJava Android Bindings](https://awesome-repositories.com/f/mobile-development/rxjava-android-bindings.md) — Integrates the RxJava framework with the Android runtime to manage stream lifecycles.
- [Reactive Programming Patterns](https://awesome-repositories.com/f/mobile-development/android-ecosystem/android-development/reactive-programming-patterns.md) — Implements reactive programming patterns tailored for Android to ensure proper resource release during teardown.
