func (w *gcWork) dispose() {
	if wbuf := w.wbuf1; wbuf != nil {
		if wbuf.nobj == 0 {
			putempty(wbuf)
		} else {
			putfull(wbuf)
			w.flushedWork = true
		}
		w.wbuf1 = nil

		wbuf = w.wbuf2
		if wbuf.nobj == 0 {
			putempty(wbuf)
		} else {
			putfull(wbuf)
			w.flushedWork = true
		}
		w.wbuf2 = nil
	}
	if w.bytesMarked != 0 {
		// dispose happens relatively infrequently. If this
		// atomic becomes a problem, we should first try to
		// dispose less and if necessary aggregate in a per-P
		// counter.
		atomic.Xadd64(&work.bytesMarked, int64(w.bytesMarked))
		w.bytesMarked = 0
	}
	if w.heapScanWork != 0 {
		gcController.heapScanWork.Add(w.heapScanWork)
		w.heapScanWork = 0
	}
}
// dispose returns any cached pointers to the global queue.
// The buffers are being put on the full queue so that the
// write barriers will not simply reacquire them before the
// GC can inspect them. This helps reduce the mutator's
// ability to hide pointers during the concurrent mark phase.
//
//go:nowritebarrierrec
dispose returns any cached pointers to the global queue.
The buffers are being put on the full queue so that the
write barriers will not simply reacquire them before the
GC can inspect them. This helps reduce the mutator's
ability to hide pointers during the concurrent mark phase.

nowritebarrierrec
// dispose returns any cached pointers to the global queue . // The buffers are being put on the full queue so that the // write barriers will not simply reacquire them before the // GC can inspect them . This helps reduce the mutator ' s // ability to hide pointers during the concurrent mark phase . // // go : nowritebarrierrec
func (w *gcWork) dispose() {
	if wbuf := w.wbuf1; wbuf != nil {
		if wbuf.nobj == 0 {
			putempty(wbuf)
		} else {
			putfull(wbuf)
			w.flushedWork = true
		}
		w.wbuf1 = nil
		wbuf = w.wbuf2
		if wbuf.nobj == 0 {
			putempty(wbuf)
		} else {
			putfull(wbuf)
			w.flushedWork = true
		}
		w.wbuf2 = nil
	}
	if w.bytesMarked != 0 {
		atomic.Xadd64(&work.bytesMarked, int64(w.bytesMarked))
		w.bytesMarked = 0
	}
	if w.heapScanWork != 0 {
		gcController.heapScanWork.Add(w.heapScanWork)
		w.heapScanWork = 0
	}
}
func ( w * gcWork ) dispose ( ) { if wbuf := w . wbuf1 ; wbuf != nil { if wbuf . nobj == 0 { putempty ( wbuf ) } else { putfull ( wbuf ) w . flushedWork = true } w . wbuf1 = nil wbuf = w . wbuf2 if wbuf . nobj == 0 { putempty ( wbuf ) } else { putfull ( wbuf ) w . flushedWork = true } w . wbuf2 = nil } if w . bytesMarked != 0 { atomic . Xadd64 ( & work . bytesMarked , int64 ( w . bytesMarked ) ) w . bytesMarked = 0 } if w . heapScanWork != 0 { gcController . heapScanWork . Add ( w . heapScanWork ) w . heapScanWork = 0 } }
dispose returns any cached pointers to the global queue.
dispose returns any cached pointers to the global queue .
// dispose happens relatively infrequently. If this // atomic becomes a problem, we should first try to // dispose less and if necessary aggregate in a per-P // counter.