Around 04:18pm on Monday, April 20, 2009 (UK time), Jos Timanta Tarigan scrawled:
> hi, > > when you put an object to a vector eg: vector1.push_back(object); dyou copy > the object or just sending the pointer to that object? is there any point of > creating a vector of pointer for efficiency stuuff? You can do either. Depending on the size of the object it will probably be quicker copying the pointer into and out of the vector, rather than copying the entire object. However if you dealing with a vector of pointers, you need to make sure you delete the objects themselves - deleting a vectori of pointers won't delete the actual objects. Steve -- (o< www.stevesearle.com //\ Powered by Fedora V_/_ No MS products were used in the creation of this message 16:23:49 up 14 days, 3:46, 1 user, load average: 0.15, 0.16, 0.08
