MCPcopy
hub / github.com/NVIDIA/aistore / incrementRef

Method incrementRef

dsort/manager.go:542–544  ·  view source on GitHub ↗

incrementRef increments reference counter. This prevents from premature cleanup. Each increment should have corresponding decrement to prevent memory leaks. NOTE: Manager should increment ref every time some data of it is used, otherwise unexpected things can happen.

(by int64)

Source from the content-addressed store, hash-verified

540// NOTE: Manager should increment ref every time some data of it is used, otherwise
541// unexpected things can happen.
542func (m *Manager) incrementRef(by int64) {
543 m.refCount.Add(by)
544}
545
546// decrementRef decrements reference counter. If it is 0 or below and dsort has
547// already finished returns true. Otherwise, false is returned.

Callers 1

extractLocalShardsMethod · 0.95

Calls 1

AddMethod · 0.65

Tested by

no test coverage detected