3 ms·
You add multiple next variables. buffer.next, buffer.next_displayed, etc
by gnubison 1y ago
You add multiple next variables. buffer.next, buffer.next_displayed, etc
- paraboul 1y agoThat's not an advantage of intrusive data structures then. That's precisely an advantage of non-intrusive data structure : object can be inserted in an arbitrary number of containers
- mikepurvis 1y agoBut for the intrusive one you have the visibility into its membership in the other structures, since you're holding a reference to the object and its intrusive fields. In the non-intrusive case, all you know is how you got there, you don't have return info to the other structures— particularly annoying if you're trying to destroy an object and have to speculatively look for references to it in the other lists in order to get rid of them.