Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
ant6n
on Dec 25, 2014
|
parent
|
context
|
favorite
| on:
Intrusive lists in Doom 3
If you use a std::List<T>, doesn't it uses nodes like
T data p next p previous p owner
anyway? It shouldn't create a pointer to the data, just like a std::vector<T> isn't an array of pointers to T.
desdiv
on Dec 25, 2014
|
next
[–]
Let's say I have a bunch of
Bullet
objects, and each
Bullet
belongs to multiple lists. In that case, std::list<Bullet> doesn't work and I have to use std::list<Bullet*> instead, thus the extra pointer dereference.
SamReidHughes
on Dec 25, 2014
|
prev
[–]
Only without the owner pointer. But intrusive lists don't need an owner pointer either.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: