[Issue 21756] New: Immutable array literals cause runtime GC allocation instead of static readonly section allocation
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Wed Mar 24 08:55:42 UTC 2021
https://issues.dlang.org/show_bug.cgi?id=21756
Issue ID: 21756
Summary: Immutable array literals cause runtime GC allocation
instead of static readonly section allocation
Product: D
Version: D2
Hardware: All
URL: http://dlang.org/
OS: All
Status: NEW
Severity: major
Priority: P3
Component: dmd
Assignee: nobody at puremagic.com
Reporter: eyal at weka.io
auto f() { return "abc"; } // @nogc, cheap
auto g() { return ['a', 'b', 'c']; } // allocates via GC, at runtime
--
More information about the Digitalmars-d-bugs
mailing list