closeTexture marked the texture terminated but kept the frame last handed to the engine and any frame still waiting, and TextureRgba had no finalize, so each closed session kept one or two frame-sized buffers forever (2 x width x height x 4 bytes measured per 1080p session). terminate now frees both buffers under the texture mutex: the texture is already unregistered and OnRgba stops copying once terminated is set. A finalize frees them as well. GObject and GL lifetime are unchanged here. Tests: close_frees_frame_buffers, closed_texture_ignores_late_frames, finalize_frees_frame_buffers and frames_racing_close pass (also under ASan); the four recycling tests still fail. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| texture_rgba_renderer.h | ||
| texture_rgba_renderer_plugin.h | ||