>>I just did a test
>>The memory allocation is OK, goes up and down
>>
>>So, sorry - false alarm - for your case
>>
>>
>>function Do_it()
>>
>> do while true
>> =allocate()
>> enddo
>>endfunc
>>
>>function allocate()
>> local aa
>>
>> aa = space(8*1024*1024)
>>endfunc
>>
>
>I am not seeing how this helps me.
It doesn't - this test indicates that releasing the variables prior to returning from the routine does not influence the memory footprint, ie it cannot be the source of your problem
Gregory