单例模式

單例模式
dānlìmóshì
noun

Meanings

  1. 1 singleton pattern (OOP design pattern)

Examples

HSK 7-9
Shùjùkù liánjiēchí tōngcháng shǐyòng dānlìmóshì.
Database connection pools usually use the singleton pattern.
HSK 7-9
Dānlìmóshì bǎozhèng yí ge lèi zhǐ yǒu yí ge shílì.
The singleton pattern ensures a class has only one instance.

Tips

usage
One of the 23 GoF (Gang of Four) design patterns. 单例 literally 'single instance' - the pattern forces a class to have exactly one instance globally. Interview-favourite topic in Chinese software engineering.

Stroke Order

dān
shì