Thanks for your bug report. I have not been able to reproduce this issue here.

In my tests, the &binvar is automatically freed when the on sockread event ends.

You can test for this by, eg. calling //echo $bvar(&binvar,0) after the on sockread event exits.

Can you provide a script that reproduces your issue? Your test script should use /socklisten, /sockopen, /sockwrite, and the socket events, so that I can run it here to reproduce your issue.