slow runtime
Jonathan M Davis
jmdavisprog at gmail.com
Fri Sep 10 01:17:46 PDT 2010
On Friday 10 September 2010 00:50:32 bearophile wrote:
> Jonathan M Davis:
> > Aren't they _always_ on the heap?
>
> void main() {
> int[10] a;
> int[] b = a[];
> }
>
> Bye,
> bearophile
Ah, good point. When you have a slice of a static array as opposed to a dynamic
arra allocated with new, then it's on the stack. Since I pretty much never use
static arrays, I forgot about that.
- Jonathan M Davis
More information about the Digitalmars-d-learn
mailing list