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

Use Base._unsetindex! in pop! and popfirst! #897

Merged
merged 5 commits into from
Feb 20, 2024

Conversation

kpamnany
Copy link
Contributor

@kpamnany kpamnany commented Feb 16, 2024

For Deque and CircularDeque. So that popped elements are not rooted by the deque and can be GCed when they drop out of caller scope.

Completes the fix of #884.

Copy link
Member

@nickrobinson251 nickrobinson251 left a comment

Choose a reason for hiding this comment

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

Thanks, @kpamnany ! LGTM

@oxinabox are you still somewhat of a maintainer here? It'd be very helpful for us (at RAI) to get a new release with this fix 🙏 Or perhaps you could give me permissions on this repo? (I used to have them but never asked for them back when i lost all perms because of a MFA change) -- thanks, Frames!

src/deque.jl Outdated Show resolved Hide resolved
src/deque.jl Outdated Show resolved Hide resolved
@oxinabox
Copy link
Member

@nickrobinson251 I am still maintaining things here, but I am happy to hand this one over to you.
Go to https://github.com/orgs/JuliaCollections/ to accept your invite back to the org.

Usual procedure once happy with it: merge it into master, and backport it into #0.18-release,

@nickrobinson251
Copy link
Member

Also i wonder if we could add a test for this? Something based on checking summarysize perhaps?

@kpamnany kpamnany changed the title Use Base._unsetindex! in pop! and popfirst! for Deque Use Base._unsetindex! in pop! and popfirst! Feb 20, 2024
src/circ_deque.jl Outdated Show resolved Hide resolved
src/circ_deque.jl Outdated Show resolved Hide resolved
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>
@kpamnany kpamnany force-pushed the kp/fix-deque branch 2 times, most recently from c1ed503 to d078d0d Compare February 20, 2024 16:23
src/circ_deque.jl Outdated Show resolved Hide resolved
@kpamnany kpamnany force-pushed the kp/fix-deque branch 2 times, most recently from 6cadce7 to 856a86b Compare February 20, 2024 17:23
So that popped elements are not rooted by the deque and can be
GCed when they drop out of caller scope.
So that popped elements are not rooted by the deque and can be GCed
when they drop out of caller scope.
@nickrobinson251 nickrobinson251 merged commit 5451407 into JuliaCollections:master Feb 20, 2024
10 checks passed
nickrobinson251 pushed a commit that referenced this pull request Feb 20, 2024
* Bump codecov/codecov-action from 3 to 4

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Use `Base._unsetindex!` in `pop!` and `popfirst!` for Deque

So that popped elements are not rooted by the deque and can be
GCed when they drop out of caller scope.

* Test Deque for leaks

* Use `Base._unsetindex!` in `pop!` and `popfirst!` for CircularDeque

So that popped elements are not rooted by the deque and can be GCed
when they drop out of caller scope.

* Test CircularDeque for leaks

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
nickrobinson251 added a commit that referenced this pull request Feb 20, 2024
* Use `Base._unsetindex!` in `pop!` and `popfirst!` (#897)

* Bump codecov/codecov-action from 3 to 4

Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](codecov/codecov-action@v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <[email protected]>

* Use `Base._unsetindex!` in `pop!` and `popfirst!` for Deque

So that popped elements are not rooted by the deque and can be
GCed when they drop out of caller scope.

* Test Deque for leaks

* Use `Base._unsetindex!` in `pop!` and `popfirst!` for CircularDeque

So that popped elements are not rooted by the deque and can be GCed
when they drop out of caller scope.

* Test CircularDeque for leaks

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Bump version

* Make compatible with ancient Julia versions

* fixup! Make compatible with ancient Julia versions

* fixup! fixup! Make compatible with ancient Julia versions

---------

Signed-off-by: dependabot[bot] <[email protected]>
Co-authored-by: Kiran Pamnany <[email protected]>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
@kpamnany kpamnany deleted the kp/fix-deque branch July 12, 2024 16:27
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.

3 participants