+
+ if (ud->generation != generation) {
+ auto it = lingering_generations.find(ud->generation);
+ assert(it != lingering_generations.end());
+ if (--it->second.num_frames_left == 0) {
+ lingering_generations.erase(it); // Deallocates the userdata block.
+ }
+ }