I think this is the problem. When you use Ascii()
, it returns what basically is an array pointer in C. You have to manually free the array since there is no garbage collector to clean up the heap.
I picked up a copy of PureBasic many years ago and used it a few times for writing quick tools, since BASIC (Locomotive, ST, and GFA) was my first family of languages, and I sometimes get sentimental. It is still developed and actually a really nice implementation. But like /u/insertAlias wrote, in terms of commercial viability and "popularity", VB is where it's at.
Now it is PureBasic (https://www.purebasic.com/). It is very code centric, which appeals to my taste. Here (https://ricardo-sdl.itch.io/) you can check the games I created using it, also includes the source code.