Static Constructors

Saaa empty at needmail.com
Sat Oct 4 05:34:56 PDT 2008


>>
>>> deleting is even more annoying.
>>>
>> You don't have to delete anything.  This is what the GC is for.
>>
>
> delete could be "remove element 42 from an array of 54 resulting an an 
> array of 53"
>
>  data = data[0..42] ~ data[43..$];
> or
>  data[42..$-1] = data[43..$].dup; // in-place sortof
>  data.length = data.length-1;
>

Yes, like that :)
What is the difference between those two? I mean, what do you mean by 
in-place. 




More information about the Digitalmars-d-learn mailing list