-
Notifications
You must be signed in to change notification settings - Fork 530
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
WeakRef support #501
Comments
@Ethan-Arrowood @dnlup Maybe? This can be fun if you want to get more familiar with weak refs. |
To test if it has been garbage collected, we could use |
I think you can use finalization registry as well to check for gc |
I mean you can write something and then null the refs? |
Yup, thanks for the pointers |
We should test that a
WeakRef
:dPool
orClient
does not get garbage collected while there is an active socket.So basically if the pool/client has no pending request and idle/keepalive timeout has expired it should be garbage collected, otherwise not.
I think this already works but needs a regression test.
Client
has a ref toPool
throughonDrain
listener andSocket
has a ref toClient
through[kClient]
.I think sockets are GC roots so I believe they will never be GC:d while there is still an active connection.
The text was updated successfully, but these errors were encountered: