See in the forum the topic 'Memory Leak UTF-8 mode Select Case Case' at:
https://www.freebasic.net/forum/viewtopic.php?t=32547
The memory leak also happens with a 'normal' ascii file if you make the 'CASE' with WStr:
Dim c As String = "abc"
Do
Select Case c
Case WStr("a")
End Select
Loop