pub fn fromOwnedSlice(gpa: Allocator, slice: Slice) Self
ArrayList takes ownership of the passed in slice. The slice must have been allocated with gpa. Deinitialize with deinit or use toOwnedSlice.
gpa
deinit
toOwnedSlice
gpa: Allocator
slice: Slice
93 94 95 96 97 98 99 100
pub fn fromOwnedSlice(gpa: Allocator, slice: Slice) Self { return Self{ .items = slice, .capacity = slice.len, .allocator = gpa, .pointer_stability = .{}, }; }
ArrayList takes ownership of the passed in slice. The slice must have been allocated with
gpa. Deinitialize withdeinitor usetoOwnedSlice.