DescriptionAdd ScopedGeneric.
This is intended to be used in a typedef for declaring various types of
scoped resources, like ScopedFD or ScopedGDIObject. It attempts to be like
scoped_ptr but without pointer semantics.
Currently the scoped objects are either custom one-offs that don't support move
semantics and have subtly varying behavior, or they use a pointer like ScopedFD
which is a memory stomp waiting to happen (since you must keep the int* alive
longer than the scoper so it can be dereferenced and closed).
R=ajwong@chromium.org, viettrungluu@chromium.org, ajwong
Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=256596
Patch Set 1 #Patch Set 2 : #Patch Set 3 : header guard #Patch Set 4 : removed bool #
Total comments: 5
Patch Set 5 : Trung's comments addressed #
Total comments: 3
Patch Set 6 : merge #Patch Set 7 : rename #
Total comments: 1
Patch Set 8 : #Patch Set 9 : #
Messages
Total messages: 20 (0 generated)
|