01-01-2025, 10:01 AM
regarding _Mem, run the following snippet
it's clear that the memory allocated to the string s is being addressed, so why do I need to free m which behaves as a pointer to s ?
Code: (Select All)
Dim m As _MEM
Dim As Long i
Dim As _Byte ascii
Dim As String * 80 s
m = _Mem(s)
For i = 0 To 79
ascii = 33 + i
_MemPut m, m.OFFSET + i, ascii
Next
Print s
it's clear that the memory allocated to the string s is being addressed, so why do I need to free m which behaves as a pointer to s ?