If &MyVar is not being unset, then you should be able to put the debugging message
echo -s event $event $bvar(&MyVar) $bvar(&MyVar,0)
at the top of your ON SOCKREAD event and find that it exists with a non-zero size, and I don't see that when I add that check to one of my scripts.
While there might be a memory leak of some kind, your example doesn't demonstrate it. Also, if you are finding sockread causing mirc memory to increase gradually due to a &binvar not being unset, does the increase stop happening if you instead have it read to a %variable ?