You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Let's say I want to register multiple cleanup functions in an Iterator.
The first function will be in cleanup_head_, the first place of linked list
The second function will be in cleanup_head_.next, the second place of linked list, which is fine by now
But the third function will be in cleanup_head_.next, the second place of linked list, so far and so forth, why do insertion always happens in the second place of linked list?
If I'm understanding it right: If we registered 4 cleanup functions like [A,B,C,D] , it will called in a sequence like [A, D, C, B]
I demonstrated it here :https://godbolt.org/z/Kf6YYfnKn
what's the design thoughts here?
The text was updated successfully, but these errors were encountered:
I've read some source code of Iterator and having this confusion about
Iterator::RegisterCleanup
Let's say I want to register multiple cleanup functions in an Iterator.
If I'm understanding it right: If we registered 4 cleanup functions like [A,B,C,D] , it will called in a sequence like [A, D, C, B]
I demonstrated it here :https://godbolt.org/z/Kf6YYfnKn
what's the design thoughts here?
The text was updated successfully, but these errors were encountered: