Avoid raw memory allocations