Files
java-design-patterns/localization/ar/dirty-flag

title, shortTitle, category, language, tag
title shortTitle category language tag
Dirty Flag Dirty Flag Behavioral ar
Game programming
Performance

Also known as

  • IsDirty pattern

Purpose

Avoid the costly re-acquisition of resources. Resources retain their identity, are stored in some fast-access storage, and are reused to avoid having to acquire them again.

Class Diagram

alt text

Applicability

Use the Dirty Flag pattern when

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

Credits