MCPcopy
hub / github.com/lxn/walk / Add

Method Add

windowgroup.go:172–184  ·  view source on GitHub ↗

Add changes the group's reference counter by delta, which may be negative. If the reference counter becomes zero the group will be disposed of. If the reference counter goes negative Add will panic.

(delta int)

Source from the content-addressed store, hash-verified

170//
171// If the reference counter goes negative Add will panic.
172func (g *WindowGroup) Add(delta int) {
173 if g.removed {
174 panic("walk: add() called on a WindowGroup that has been removed from its manager")
175 }
176
177 g.refs += delta
178 if g.refs < 0 {
179 panic("walk: negative WindowGroup refs counter")
180 }
181 if g.refs-g.ignored == 0 {
182 g.dispose()
183 }
184}
185
186// Done decrements the group's reference counter by one.
187func (g *WindowGroup) Done() {

Callers 2

DoneMethod · 0.95
CreateGroupMethod · 0.45

Calls 1

disposeMethod · 0.95

Tested by

no test coverage detected