Is @live attribute working yet?
elfstone
elfstone at yeah.net
Sun Apr 24 11:50:14 UTC 2022
On Sunday, 24 April 2022 at 11:07:43 UTC, Tejas wrote:
> On Sunday, 24 April 2022 at 09:31:40 UTC, elfstone wrote:
>> Dub(DMD 2.099.1) builds and runs the following code without a
>> warning.
>>
>> import std.stdio;
>> import core.stdc.stdlib;
>>
>> @live
>> void test()
>> {
>> int* p = cast(int*) malloc(32);
>> p = cast(int*) malloc(32);
>> free(p);
>> }
>>
>> void main()
>> {
>> test();
>> writeln("???");
>> }
>>
>> Isn't it supposed to trigger an error according to the doc
>> (https://dlang.org/spec/ob.html)?
>>
>> @live void test()
>> {
>> auto p = allocate();
>> p = allocate(); // error: p was not disposed of
>> release(p);
>> }
>
> It's development is stalled 😞
>
> https://forum.dlang.org/post/dvbqnlpqainnbtmbuyhl@forum.dlang.org
Thanks a lot. I guess I should have taken the "Experimental,
Subject to Change" seriously. Still the doc really should be more
accurate, like "Just the Idea/To Be Implemented".
More information about the Digitalmars-d-learn
mailing list