Skip to content

fix: share a SyncClock with the custom sources constructed with it - #474

Merged
devopvoid merged 1 commit into
mainfrom
fix/sync-clock-lifetime
Oct 28, 2026
Merged

devopvoid merged 1 commit into
mainfrom
fix/sync-clock-lifetime

Conversation

@devopvoid

Copy link
Copy Markdown
Owner

Custom audio and video sources wrapped a passed SyncClock in a shared_ptr with an empty deleter, so SyncClock.dispose() freed the clock while the sources still held it.

The Java handle now holds a shared_ptr to the native clock, and each source takes its own reference. Disposing the clock only drops the wrapper's reference, so a source keeps the clock until it is disposed itself.

The sources wrapped the clock in a shared_ptr with an empty deleter, so
SyncClock.dispose() freed it while they still used it. The Java handle now
holds a shared_ptr and the sources take their own reference.
@devopvoid
devopvoid merged commit 4e20592 into main Oct 28, 2026
22 checks passed
@devopvoid
devopvoid deleted the fix/sync-clock-lifetime branch October 29, 2026 19:28
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.

1 participant