RAII
名词 n.
英文释义
名词 n.
-
Initialism of Resource Acquisition Is Initialization, a popular design pattern in object-oriented programming that ties resources to the lifespan of associated objects to prevent resource leakage.
— With RAII, the closing action cannot be skipped or bypassed, even if the function exits the scope prematurely with an early return or by throwing an exception.
词源
Coined by Bjarne Stroustrup.
0 次浏览
数据来源: Wiktionary