Recently I was converting a program from Blitz BASIC and I (a bit naively I admit) replaced all the
Code: Select all
p = New Thing
...
Delete p
Code: Select all
*p = AllocateMemory(SizeOf(Thing))
...
FreeMemory(*p)
It caused a memory leak that took me hours to track down. And I found that in this situation there doesn't seem to be any obvious way to free the strings at all.
In the end I swapped the strings for memory buffers and a lot of confusing peeking and poking.
Could you add some New/Delete operators that take care of strings automatically?
Thanks for reading.