Files
java-design-patterns/dirty-flag
Robert Volkmann ae64433211 dependencies: update spring-boot-dependencies 2.0.9 to 2.7.5 (#2156)
Remove explicit dependencies that are covered by spring-boot-dependencies
hibernate 5.4.24 -> 5.6.12
spring-webmvc 5.0.17 -> 5.3.23
spring-data-jpa 2.0.14 -> 2.7.5
junit 4.12 -> 4.13.2
junit-jupiter 5.7.1 -> 5.8.2
slf4j 1.7.30 -> 1.7.36
logback 1.2.9 -> 1.2.11
jackson 2.12.3 -> 2.13.4
lombok 1.18.22 -> 1.18.24
byte-buddy 1.11.5 -> 1.12.8
jaxb-impl 2.3.2 -> 2.3.7
2022-10-30 17:32:42 +02:00
..
2019-12-07 18:03:49 +02:00
2022-09-14 23:22:24 +05:30

title, category, language, tags
title category language tags
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