✨ ARCANUM RUNE DIFFICULTY: Adept Creational

The Singleton

Ensuring a single global focal point for a scrying pool.

✧ GANG OF FOUR LINEAGE & ARCANUM ✧
GOF DESIGN PATTERN: Singleton
ARCANUM SCHOOL: Conjuration // Monolith
SCRIBE / ARCHON: Joshua Edward McLaughlin Cox
CANONICAL REGISTRATION:
// CODEX INCANTATION //
coclass 'ScryingPool'
instance_ScryingPool_ =: ''

get_instance =: 3 : 0
  if. 0 = # instance_ScryingPool_ do.
    instance_ScryingPool_ =: conew 'ScryingPool'
  end.
  instance_ScryingPool_
)

A classic singleton using a global locale variable to hold the unique instance reference.

Runic Tags: #singleton #global #scrying #locale