in reply to Re^4: Strange memory growth
in thread Strange memory growth

Yes that is true, the function used does not matter. The solution from huck is fine. I updated my original post with a similar example.