June 11, 2019 Re: D compiler need -nogc witch and document of library also need nogc button | ||||
---|---|---|---|---|
| ||||
Posted in reply to KnightMare | On Tuesday, 11 June 2019 at 10:24:05 UTC, KnightMare wrote:
> On Tuesday, 11 June 2019 at 08:05:31 UTC, dangbinghoo wrote:
>> I think that D compiler needs -nogc switch to fully disable gc for a project,
>>
> LDC -nogc?
>
thanks for help. It's a shame that I didn't look in details of the LCD help info.
Yeah, the great LDC already support this!
Thanks!
-------
binghoo dang
|
June 11, 2019 Re: D compiler need -nogc witch and document of library also need nogc button | ||||
---|---|---|---|---|
| ||||
Posted in reply to dangbinghoo | On Tue, Jun 11, 2019 at 02:46:03PM +0000, dangbinghoo via Digitalmars-d-learn wrote: > On Tuesday, 11 June 2019 at 12:40:39 UTC, Adam D. Ruppe wrote: > > On Tuesday, 11 June 2019 at 08:59:01 UTC, dangbinghoo wrote: > > > We need to make sure we use only @nogc API when writing code, not when running the app. > > > > That's what the @nogc annotation does, statically forces you to only use other @nogc stuff via compiler errors. > > yeah, @nogc does the job. But the problem is that, you need to mark all functions, classes, everything you write to manually marked, so if compiler supports -nogc, it will helps great. [...] Try putting `@nogc:` at the top of each file, like this: @nogc: struct MyStruct { ... } int myFunc(...) { ... } // etc. T -- Never ascribe to malice that which is adequately explained by incompetence. -- Napoleon Bonaparte |
Copyright © 1999-2021 by the D Language Foundation