Skip to content

Deinitialize lazy reference storage on destroy - #129

Open
fallintoplace wants to merge 1 commit into
apple:mainfrom
fallintoplace:fix-lazy-reference-destroy-deinitialize
Open

Deinitialize lazy reference storage on destroy#129
fallintoplace wants to merge 1 commit into
apple:mainfrom
fallintoplace:fix-lazy-reference-destroy-deinitialize

Conversation

@fallintoplace

Copy link
Copy Markdown

Summary

  • Update UnsafeAtomicLazyReference.destroy() to deinitialize its storage before deallocating it.
  • Preserve the existing dispose() behavior and returned final value.

Why

UnsafeAtomic.destroy() disposes, deinitializes, and then deallocates its storage. UnsafeAtomicLazyReference.destroy() already disposed and deallocated, but skipped the matching deinitialization step.

Notes

This keeps the storage lifecycle consistent with the documented destroy behavior and the regular unsafe atomic implementation.

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