fn toOwnedSlice(self: *Self) Allocator.Error!Slice

The caller owns the returned memory. Empties this ArrayList, Its capacity is cleared, making deinit() safe but unnecessary to call.

Parameters

self: *Self,