Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: 添加copy on write list实现 #260

Merged
merged 2 commits into from
Sep 28, 2024

Conversation

xinghe903
Copy link
Contributor

feat: 添加copy on write list实现

}

// 这里不涉及缩容,每次都是当前内容长度申请的数组容量
func (a *CopyOnWriteArrayList[T]) Delete(index int) (T, error) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要使用 slice DELETE 方法了,你直接循环复制

@flycash flycash merged commit 44dea05 into ecodeclub:dev Sep 28, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants