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
{{ message }}
Repository navigation
[Impeller] VkImageView leak in WrappedTextureSourceVK (embedder delegate path) #181967
WrappedTextureSourceVK in shell/gpu/gpu_surface_vulkan_impeller.cc leaks a VkImageView every frame when using the embedder delegate code path.
Steps to reproduce
Create a custom embedder using FlutterVulkanRendererConfig (the Vulkan delegate path)
Run any Flutter app
Each frame, AcquireFrame calls createImageView() and stores the result as a raw vk::ImageView
The destructor ~WrappedTextureSourceVK() {} is empty — the VkImageView is never destroyed
This leaks ~60 VkImageView handles per second. On a long-running app this will eventually exhaust driver resources.
Analysis
The fix is straightforward: use vk::UniqueImageView instead of raw vk::ImageView for RAII ownership. The resource lifetime is safe because Impeller's TrackedObjectsVK holds a shared_ptr<TextureSourceVK> until the GPU fence signals completion, preventing premature destruction.
This only affects the embedder delegate path (delegate_ != nullptr). Android passes nullptr as the delegate and uses AcquireNextSurface() instead, so Android is not affected.
Environment
Found on Linux/Wayland with a custom Vulkan embedder
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.
Activity
[Impeller] Fix VkImageView leak in WrappedTextureSourceVK (#181966)
[Impeller] Fix VkImageView leak in WrappedTextureSourceVK (flutter#18…
github-actions commentedon Feb 25, 2026
This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of
flutter doctor -vand a minimal reproduction of the issue.[Impeller] Fix VkImageView leak in WrappedTextureSourceVK (flutter#18…
[Impeller] Fix VkImageView leak in WrappedTextureSourceVK (#181966)