Making containers that "go both ways"
Jarrett Billingsley
kb3ctd2 at yahoo.com
Sat Jan 26 07:01:58 PST 2008
"janderson" <askme at me.com> wrote in message
news:fnem61$2054$1 at digitalmars.com...
> Personally I'd make it a class. Yes its going to go on the heap however
> the resizeable array part or whatever the container contains, will
> probably go on the heap anyway.
Good point. Also keep in mind that even if it's a class, it can be
allocated on the stack in functions if you use 'scope x = new X()', so
there's at least one heap allocation avoided.
More information about the Digitalmars-d
mailing list