The following code fails to compile when using [OB](https://dlang.org/spec/ob.html):

```d
@live void show(scope ref string s) {
  import std.stdio;
  writeln(s);
}

@live void main()
{
    auto s = "foo bar";
    show(s);
    show(s);
}
```

Compile with:

```
dmd -preview=dip1021 ...
```

Error:

```
source/app.d(8): Error: variable `app.main.s` is not disposed of before return
    auto s = "foo bar";
         ^
```

How do I dispose of the string?

Reply via email to