# Io.Writer fix dangling pointer · gitcafe/zig

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

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

Visibility: public

Requested revision: 6219c015d8e8c958d96e5caa5ef0dbab9c414996

Requested commit: 6219c015d8e8c958d96e5caa5ef0dbab9c414996

Commit: 6219c015d8e8c958d96e5caa5ef0dbab9c414996

Tree: 67b90037ac1616daa1becaad8dcbe0a1968b170f

Author: Igor Anić

Committer: Andrew Kelley

## Message

```
Io.Writer fix dangling pointer

While underlying writer is Allocating writer buffer can grow in
vtable.drain call. We should not hold pointer to the buffer before that
call and use it after.
This remembers positions instead of holding reference.

```

## Parents

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

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