How to best clear a slice: empty vs. nil

CODE EXAMPLE You can clear a slice either by setting it to nil and releasing the underlying memory, or by slicing it to zero length and thereby keeping the memory.