pub fn initTakeOwnership(allocator: Allocator, cmd_line_utf8: []const u8) InitError!Self allocator: Allocatorcmd_line_utf8: []const u8773
774
775
776
777
778
779
780
781
782
783 pub fn initTakeOwnership(allocator: Allocator, cmd_line_utf8: []const u8) InitError!Self {
const buffer = try allocator.alloc(u8, cmd_line_utf8.len + 1);
errdefer allocator.free(buffer);
return Self{
.allocator = allocator,
.cmd_line = cmd_line_utf8,
.free_cmd_line_on_deinit = true,
.buffer = buffer,
};
}
cmd_line_utf8 will be free'd (with the allocator) on deinit()