ref arguments

Saaa empty at needmail.com
Mon Sep 21 20:46:23 PDT 2009


Thanks Jeremie Pelletier!

Good to see I'm not going crazy (<none> /  in)  :)
just a few small questions:

What exactly is a storage class?
Is it this:
C has a concept of 'Storage classes' which are used to define the scope 
(visability) and life time of variables and/or functions.

Dynamic arrays are always on the heap, right?

I never use "new (array)"  nor change references in other ways except 
changing
the length.
I suspect, the old array gets garbage collected if no other references point 
to it :)
I also suspect "new (array)"  to never allocate in place even if the length
is equal or smaller and no other pointers point to the old array, because 
the
gc needs to run first to check for this.

In stead of a table I made a nice diagram:
http://bayimg.com/kAEkNAaCA
Is it correct? 




More information about the Digitalmars-d-learn mailing list