so technically im gonna im gonna deal with lots and lots of objects, dynamically added and removed from the vector. so i think we agree on vector of pointer :)
but i also notice the not deleted object matter. so if i remove the object from the vector, i have to call destructor for this object? what happened if i just let it go (not calling the destructor)? will the memory remain occupied? thanks in advance :) --- On Mon, 4/20/09, Tyler Littlefield <[email protected]> wrote: From: Tyler Littlefield <[email protected]> Subject: Re: [c-prog] vector of pointer To: [email protected] Date: Monday, April 20, 2009, 11:28 AM >This is C++, not C. I understand that. And the methods for passing an object to a function are still the same. One pointer means one cycle to push it on the stack. A larger object means a lot more cycles. Thanks, Tyler Littlefield Web: tysdomain.com email: ty...@tysdomain. com My programs don't have bugs, they're called randomly added features. ----- Original Message ----- From: Paul Herring To: c-p...@yahoogroups. com Sent: Monday, April 20, 2009 9:25 AM Subject: Re: [c-prog] vector of pointer On Mon, Apr 20, 2009 at 4:22 PM, Tyler Littlefield <ty...@tysdomain. com> wrote: > I would use pointers, it's easier to pass in one function call rather than passing an object of what ever size. This is C++, not C. -- PJH http://shabbleland. myminicity. com/ind http://www.chavgang s.com/register. php?referer= 9375 [Non-text portions of this message have been removed] [Non-text portions of this message have been removed]
