등)/profiling/... 등의
resource initialization module
자원 초기화 모듈
resource_acquisition_is_initialization
resource initialization is initialization
RAII
(we)
{"
RAII is a programming_idiom //
https://en.wikipedia.org/wiki/Programming_idiom
used in several object-oriented, statically-typed programming languages
OOPL (
object-oriented_PL
object-oriented_language
object-oriented_programming_language ), // linked to
Object-oriented_programming
statically-typed_PL (
statically-typed_language
statically-typed_programming_language )에서. // linked to
Statically-typed_programming_language redir to
Type_system#Static_typing
to describe a particular language behavior.
In
RAII, holding a resource is a class_invariant, //
Class_invariant = type_invariant ...
class_invariant type_invariant
// type_invariant = class_invariant { ( Cmp: object_invariant , or representation_invariant (see
Class_invariant ) ) ----
Class_invariant =
https://en.wikipedia.org/wiki/Class_invariant }
and is tied to object lifetime. // object lifetime object_lifetime
Object_lifetime =
https://en.wikipedia.org/wiki/Object_lifetime
Resource allocation (or acquisition) // linked to resource_allocation
Resource_allocation_(computer)
is done during object creation (specifically initialization), // object_creation 객체생성 {
객체,object 생성 }(특히
초기화,initialization) 하는 동안.
by the constructor, //
생성자,constructor(w)에 의해
while resource deallocation (release) // resource_deallocation resource_release ...
resource deallocation resource+deallocation
is done during object destruction //
object destruction finalization 차이? and
destructor finalizer
(specifically finalization), // finalization =,finalization . finalization / rel. finalizer =,finalizer . finalizer {
finalizer https://en.wikipedia.org/wiki/Finalizer finalizer finalizer }
by the destructor. // 파괴자? / 소멸자 (wk)
Destructor_(computer_programming) destructor finalizer destructor
In other words, resource_acquisition must succeed for initialization to succeed.
Thus the resource is guaranteed to be held between when
initialization finishes and
finalization starts
(holding the resources is a class invariant), // class_invariant class_invariance
and to be held only when the object is alive.
Thus if there are no object leaks, // object_leak { object leak ...
object leak object+leak }
there are no resource leaks. // resource_leak =,resource_leak . resource_leak { resource leak Sub:
memory_leak ...
자원_누수 =
https://ko.wikipedia.org/wiki/자원_누수 Resource_leak https://en.wikipedia.org/wiki/Resource_leak resource leak resource+leak }
https://en.wikipedia.org/wiki/Resource_acquisition_is_initialization
resource initialization is initialization
resource initialization is initialization
resource+acquisition+is+initialization