|
-
April 2nd, 2009, 07:21 PM
#1
::std::list::push_back()
Hello,
Maybe someone here knows the answer because I've been looking for it but could not find it:
I know (seen it) that when I use
::std::list::erase()
to remove an item from the list, a "delete" is called.
That means we've got a "new" call somewhere? (probably at push_back())?
Why am I asking?
I don't want to get to memory fragmentation with a program I build, which is going to use this linked lists heavily.
In details, I have this "list" object which stores pointers to a custom class I've made.
So pointers are added, and then removed after a while.
I'm trying to avoid new/delete as much as possible, although this linked list idea seem to be very good.
Can someone shed some light please?
Thank you!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|