betterC error?

Steven Schveighoffer schveiguy at yahoo.com
Tue Jun 12 14:36:19 UTC 2018


On 6/12/18 10:18 AM, SrMordred wrote:
> On Tuesday, 12 June 2018 at 12:29:17 UTC, rikki cattermole wrote:
>> (...)
> 
> this line:
>>>> byte[] data = [0, 1];
> is an dynamic array allocated with GC.
> But if you declare as a static array like
>>>> byte[2] data = [0, 1];
> than its not GC allocated.
> 

Or use C malloc.

We really should provide better tools to create arrays using C malloc 
(for those who want them). Like a betterC toolkit.

-Steve


More information about the Digitalmars-d mailing list