# std: Do not allocate the result for ChildProcess.init · gitcafe/zig

[View on GitCafe](https://git.cafe/gitcafe/zig/commit/a0a2ce92ca129d28e22c63f7bace1672c43776b5)

Repository: [gitcafe/zig](https://git.cafe/gitcafe/zig)

Visibility: public

Requested revision: a0a2ce92ca129d28e22c63f7bace1672c43776b5

Requested commit: a0a2ce92ca129d28e22c63f7bace1672c43776b5

Commit: a0a2ce92ca129d28e22c63f7bace1672c43776b5

Tree: 26bb1adc15b8dcc3aae1e38a4d57800d7319b030

Author: Jimmi Holst Christensen

Committer: Andrew Kelley

## Message

```
std: Do not allocate the result for ChildProcess.init

Instead, just return ChildProcess directly. This structure does not
require a stable address, so we can put it on the stack just fine. If
someone wants it on the heap they should do.

  const proc = try allocator.create(ChildProcess);
  proc.* = ChildProcess.init(args, allocator);

```

## Parents

- [0e49142ce478c13f3ec701900cd894b3536471a1](https://git.cafe/gitcafe/zig/commit/0e49142ce478c13f3ec701900cd894b3536471a1?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zig/tree/a0a2ce92ca129d28e22c63f7bace1672c43776b5?format=markdown)
