- cleanup reference in remove method of array list

pull/1/head
emirpasic 11 years ago
parent 8e5760a16e
commit 756f33ad9a

@ -82,6 +82,7 @@ func (list *List) Remove(index int) {
return
}
list.elements[index] = nil // cleanup reference
copy(list.elements[index:], list.elements[index+1:list.size]) // shift to the left by one (slow operation, need ways to optimize this)
list.size -= 1

Loading…
Cancel
Save