Get returns a stored value previously inserted with Put. Use the same reference as you got from Put.
(ref unsafe.Pointer)
| 32 | // Get returns a stored value previously inserted with Put. Use the same |
| 33 | // reference as you got from Put. |
| 34 | func (m *refMap) Get(ref unsafe.Pointer) interface{} { |
| 35 | m.lock.Lock() |
| 36 | defer m.lock.Unlock() |
| 37 | return m.refs[ref] |
| 38 | } |
| 39 | |
| 40 | // Remove deletes a single reference from the map. |
| 41 | func (m *refMap) Remove(ref unsafe.Pointer) { |