Files
java-design-patterns/dirty-flag/README.md
T
2022-11-20 16:48:05 +02:00

884 B

title, category, language, tag
title category language tag
Dirty Flag Behavioral en
Game programming
Performance

Also known as

  • IsDirty pattern

Intent

To avoid expensive re-acquisition of resources. The resources retain their identity, are kept in some fast-access storage, and are re-used to avoid having to acquire them again.

Class diagram

alt text

Applicability

Use the Dirty Flag pattern when

  • Repetitious acquisition, initialization, and release of the same resource causes unnecessary performance overhead.

Credits