@live questions
Dukc
ajieskola at gmail.com
Thu Nov 26 13:07:38 UTC 2020
On Thursday, 26 November 2020 at 06:28:03 UTC, Walter Bright
wrote:
>> As what kind of other pointer? I quess `new int()` returns a
>> pointer that is treated as `return scope`, right?
>
> No, it returns `int*`.
Huh? Won't that make the compiler to think the programmer is
leaking the pointer when it exits the scope? If I understood
correctly, `@live` requires freeing any non-null `int*`, or
forwarding them to a function that takes them as non-scoped
`int*`.
More information about the Digitalmars-d
mailing list