Skip to content

Comment on Avoiding game crashes related to linked listsparent

Comments

THE reason to use "intrusive" containers is to let a piece of data to sit in multiple containers, none of which is primary. I'll give you an skbuff and you show me how to put it on several linked lists and a couple of hashmaps with STL-style containers.

That's not the only reason. Another is simplicity.

Store multiple pointers to the same datum?

Then for deletion you need to traverse every data structure in which you store said pointers.

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.