At 02:41 AM 11/6/2003, Vytautas Leonavicius wrote:
VecP p = new Vec[64k]  in this case push_back elements will be allocated on
the heap.

Vec v = Vec[64k] in this case, on the stack, right?

right... of course, it is better to use the syntax


Vec v(640000);

as that's constructor initialization, and may avoid the creation of a temporary object and the call of a copy constructor which can happen with the

Vec v = Vec(640000);

syntax.

--
Ben Combee <[EMAIL PROTECTED]>
CodeWarrior for Palm OS technical lead
Palm OS programming help @ www.palmoswerks.com



-- For information on using the Palm Developer Forums, or to unsubscribe, please see http://www.palmos.com/dev/support/forums/

Reply via email to