Ilkka Seppälä 417f21ed3d
Code cleanup (#1461)
* Code cleanup

* Fix flux tests

* Fix checkstyle errors

* Fix compile error
2020-07-30 20:28:47 +03:00
..
2019-12-07 18:03:49 +02:00
2020-07-30 20:28:47 +03:00
2019-12-18 22:04:08 +02:00

layout, title, folder, permalink, categories, tags
layout title folder permalink categories tags
pattern Dirty Flag dirty-flag /patterns/dirty-flag/ Behavioral
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