diff options
author | 2024-05-06 19:44:22 +0000 | |
---|---|---|
committer | 2024-05-06 19:44:22 +0000 | |
commit | 3554991444c979c8c4fabc62383d1a032ae3e5fe (patch) | |
tree | 63cbd222bff33ab603ac024ba02c1a6d8ea454c7 /vendor/codeberg.org/gruf/go-structr/item.go | |
parent | feature: filters v2 server-side warning/hiding (#2793) (diff) | |
download | gotosocial-3554991444c979c8c4fabc62383d1a032ae3e5fe.tar.xz |
update go-structr -> v0.8.2 which includes some minor memory usage improvements (#2904)
Diffstat (limited to 'vendor/codeberg.org/gruf/go-structr/item.go')
-rw-r--r-- | vendor/codeberg.org/gruf/go-structr/item.go | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/vendor/codeberg.org/gruf/go-structr/item.go b/vendor/codeberg.org/gruf/go-structr/item.go index 602c5b84a..9e837e157 100644 --- a/vendor/codeberg.org/gruf/go-structr/item.go +++ b/vendor/codeberg.org/gruf/go-structr/item.go @@ -51,8 +51,12 @@ func (i *indexed_item) drop_index(entry *index_entry) { continue } + // Unset tptr value to + // ensure GC can take it. + i.indexed[x] = nil + // Move all index entries down + reslice. - copy(i.indexed[x:], i.indexed[x+1:]) + _ = copy(i.indexed[x:], i.indexed[x+1:]) i.indexed = i.indexed[:len(i.indexed)-1] break } |