RFC: moving forward with @nogc Phobos

Andrei Alexandrescu via Digitalmars-d digitalmars-d at puremagic.com
Tue Sep 30 05:23:29 PDT 2014


On 9/30/14, 1:34 AM, Johannes Pfau wrote:
> So you propose RC + global/thread local allocators as the solution for
> all memory related problems as 'memory management is not allocation'.
> And you claim that using output ranges / providing buffers / allocators
> is not an option because it only works in some special cases?

Correct. I assume you meant an irony/sarcasm somewhere :o).

> What if I don't want automated memory _management_? What if I want a
> function to use a stack buffer? Or if I want to free manually?
>
> If I want std.string.toStringz to put the result into a temporary stack
> buffer your solution doesn't help at all. Passing an ouput range,
> allocator or buffer would all solve this.

Correct. The output of toStringz would be either a GC string or an RC 
string.


Andrei



More information about the Digitalmars-d mailing list