Diffrent instance of class share static array member?
Jarrett Billingsley
kb3ctd2 at yahoo.com
Fri Sep 28 13:41:40 PDT 2007
"Brian Hsu" <brianhsu.hsu at gmail.com> wrote in message
news:fdj5bv$pab$1 at digitalmars.com...
>
> Currently I use add an constructor and in the constructor do x = x.dup in
> order to create an whole new dynamic array which only belong to specific
> instance, is my method correctly?
Yes. Regan hit the nail on the head in explaining it, and yes, this is the
right way to do it.
More information about the Digitalmars-d-learn
mailing list