# Flyweight Pattern

Record: `arch:flyweight-pattern`
Kind: pattern
Layer: [Design Patterns Core](https://banes-lab.com/records/layer/design-patterns-core.md)
Severity: contextual
Scope: structure, memory, sharing
Canonical: https://banes-lab.com/ontology#arch-flyweight-pattern

## Repair

- Refactored by: Extract Flyweight, Share Intrinsic State
- Detected by: repeated equal intrinsic state across objects
- Violated by: identical heavy state duplicated across many instances
- Measured by: duplicate-state memory footprint
- Enforced by: profiling review

## requires

- [Separable Intrinsic State](https://banes-lab.com/records/lex/separable-intrinsic-state.md)

## reinforces

- [Memory Efficiency](https://banes-lab.com/records/arch/memory-efficiency.md)

## enables

- [Shared Immutable State](https://banes-lab.com/records/lex/shared-immutable-state.md)
- [High-Cardinality Object Reuse](https://banes-lab.com/records/lex/high-cardinality-object-reuse.md)

## conflicts-with

- [Per-Instance Duplicate State](https://banes-lab.com/records/lex/per-instance-duplicate-state.md)

## tensions-with

- [Complexity](https://banes-lab.com/records/lex/complexity.md)

## tensions

- [Flyweight Pattern Complexity](https://banes-lab.com/records/tension/complexity-flyweight-pattern.md)
