Files
openclaw/apps
Kaneki 2909d8cd12 Android: fix Bitmap memory leaks in CanvasController snapshots (#41889)
* Android: fix Bitmap memory leaks in CanvasController snapshots

snapshotPngBase64() and snapshotBase64() create bitmaps via
captureBitmap() and scaleForMaxWidth() but never recycle them,
leaking native memory on every canvas snapshot invocation.

Wrap both methods in nested try/finally blocks:
- outer: always recycles the captured bitmap
- inner: recycles the scaled bitmap only when it differs from the
  captured one (scaleForMaxWidth returns `this` when no scaling needed)

Made-with: Cursor

* fix: note Android canvas snapshot bitmap leak in changelog (#41889) (thanks @Kaneki-x)

---------

Co-authored-by: Ayaan Zaidi <hi@obviy.us>
2026-03-22 08:50:42 +05:30
..
2026-03-21 01:10:29 -05:00