It’s a rule of thumb, is true, while allocations in loops can be fast as a workaround with:
Besides Libc.malloc and free, in Julia’s stdlib, there’s also: