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

Look at HeapObject for ARC statistics and don't register releases of immortal objects #189

Open
hassila opened this issue Sep 14, 2023 · 0 comments

Comments

@hassila
Copy link
Contributor

hassila commented Sep 14, 2023

As we otherwise get more releases than retains and stats look imbalanced.

Hint:
swift_release is called for the immutable empty array instance:

https://godbolt.org/z/qEfKvshP1

I think you don't need to look at the reference count (RC) but the immortal flags are next to the RC which may be in the side table:
https://github.com/apple/swift/blob/ebf46eac2322d2e7085beef4eb4bf1125404c3c9/stdlib/public/SwiftShims/swift/shims/RefCount.h#L82-L84 (edited)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

1 participant