Skip to content

Fix strong reference in Cleaners#2404

Merged
Gold856 merged 3 commits intoPhotonVision:mainfrom
Bobcat66:rknn_cleaner
Mar 26, 2026
Merged

Fix strong reference in Cleaners#2404
Gold856 merged 3 commits intoPhotonVision:mainfrom
Bobcat66:rknn_cleaner

Conversation

@Bobcat66
Copy link
Copy Markdown
Contributor

@Bobcat66 Bobcat66 commented Mar 19, 2026

Description

Removed the strong reference in the Object Detector cleaners, which prevented the object from ever being cleaned up

Closes #2044

Meta

Merge checklist:

  • Pull Request title is short, imperative summary of proposed changes
  • The description documents the what and why, including events that led to this PR
  • If this PR changes behavior or adds a feature, user documentation is updated
  • If this PR touches photon-serde, all messages have been regenerated and hashes have not changed unexpectedly
  • If this PR touches configuration, this is backwards compatible with all settings going back to the previous seasons's last release (seasons end after champs ends)
  • If this PR touches pipeline settings or anything related to data exchange, the frontend typing is updated
  • If this PR addresses a bug, a regression test for it is added
  • If this PR adds a dependency, the license has been checked for compatibility and steps taken to follow it

@Bobcat66 Bobcat66 requested a review from a team as a code owner March 19, 2026 06:27
@github-actions github-actions Bot added the backend Things relating to photon-core and photon-server label Mar 19, 2026
@Gold856
Copy link
Copy Markdown
Contributor

Gold856 commented Mar 19, 2026

Your solution is a bit overkill. Cleaner offers guarantees that make most of the logic that was previously necessary unneeded. Look into the docs for Cleaner, and also how it's implemented here: https://github.com/wpilibsuite/allwpilib/blob/7ca35e5678cf32caec6a1a866ca51d0136c4c398/wpinet/src/main/java/edu/wpi/first/net/MulticastServiceAnnouncer.java

Copy link
Copy Markdown
Contributor

@Gold856 Gold856 left a comment

Choose a reason for hiding this comment

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

Awesome, thanks!

@Gold856 Gold856 changed the title Rknn cleaner Fix strong reference in Cleaners Mar 26, 2026
@Gold856 Gold856 enabled auto-merge (squash) March 26, 2026 18:26
@Gold856 Gold856 merged commit 52f1f77 into PhotonVision:main Mar 26, 2026
59 checks passed
SpeedSlicer pushed a commit to SpeedSlicer/photonvision that referenced this pull request Mar 30, 2026
cswilson252 pushed a commit to cswilson252/photonvision that referenced this pull request Apr 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

backend Things relating to photon-core and photon-server

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Fix cleaner issues

2 participants