I don't understand why my memory is not free after process ?
Because you aren't dereferenceing your banks, ie they still exsist as valid objects, and so aren't being garbagecollected.Try this code instead:
Import Pub.ZLib FlushMem Print "MEM USED 1 : "+MemAlloced()+" / "+MemUsage() Local MySourceBank:TBank=TBank.load("C:\Dev\42ninjas\bin\logo.png") Print "MEM USED 2 : "+MemAlloced()+" / "+MemUsage() Local MyOutBank:TBank=CompressBank(MySourceBank) MyOutBank.Save("C:\Dev\logo.bin") MyOutBank = Null MySourceBank = Null FlushMem Print "MEM USED 3 : "+MemAlloced()+" / "+MemUsage() EndOh and I leave you with this quote from the manual:
Function MemFree( mem:Byte Ptr,size ) Free allocated memory.
The memory specified by mem must have been previously allocated by MemAlloc or MemExtend.
The memory specified by mem must have been previously allocated by MemAlloc or MemExtend.