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?

Thanks,

Vytautas

it works, when allocating in this way - Vec v =
> >Vec[64k]. Why?
>
> The vector implementation in MSL doesn't allocate memory until an element
> has been modified or accessed.  This is for efficiency -- you can create a
> vector and if you don't use it, you don't have the allocation overhead.
>
> -- 
> 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