Skip to content

Latest commit

 

History

History
26 lines (20 loc) · 681 Bytes

File metadata and controls

26 lines (20 loc) · 681 Bytes
layout pattern
title Dirty Flag
folder dirty-flag
permalink /patterns/dirty-flag/
categories Other
tags
Java
Difficulty-Beginner
Performance

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.

alt text

Applicability

Use the Dirty Flag pattern when

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

Credits