You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Go 1.24 adds runtime.AddCleanup, a better alternative to SetFinalizer. Just like SetFinalizer, the callback shouldn't reference the finalized object. Additionally, AddCleanup mustn't be called with arg == ptr.
We might also consider flagging usage of AddCleanup and SetFinalizer on zero size objects.
The text was updated successfully, but these errors were encountered:
Go 1.24 adds
runtime.AddCleanup
, a better alternative toSetFinalizer
. Just like SetFinalizer, the callback shouldn't reference the finalized object. Additionally, AddCleanup mustn't be called with arg == ptr.We might also consider flagging usage of AddCleanup and SetFinalizer on zero size objects.
The text was updated successfully, but these errors were encountered: