12-11-2022, 01:32 PM
(12-11-2022, 01:03 PM)mnrvovrfc Wrote: But don't "_MEM" blocks have to be freed in a specific order, to prevent memory leak? The static UDT variable (ie. what is needed before "_MEM" function, "_MEMNEW" etc. is used) would take up space anyway so it shouldn't matter.True, I assume it wouldn't matter to memory usage, since one has already created the variable/array that one is pointing to.
I suppose a multiple _MEMFREE could work like a multiple NEXT, where you would still be responsible for the order of the variable, if that's important. I always assumed that you could free a _MEM whenever you were done with it, and that it was more a thing of releasing the _MEM pointer variable. I use _MEM like a little old lady drives a car, without understanding its internal combustion principles, so I'm ill equipped to expound on it more.
I was thinking in terms of reduced typing rather than memory management.
DO: LOOP: DO: LOOP
sha_na_na_na_na_na_na_na_na_na:
sha_na_na_na_na_na_na_na_na_na: