[macOS] Cap 0.5.7 leaks ~17–18 MB/min after Studio recording/editor use until quit
Description
On macOS 26.3, Cap 0.5.7 entered a stable, linear memory-growth state after several Studio recordings and editor use. The recording pipeline had finished successfully and Cap was no longer recording, but Cap's own once-per-minute process snapshots continued increasing by approximately 17–18 MB every minute until the process reached 13.1 GB RSS. A later vmmap sample reported a 25 GB physical footprint.
During this period, the machine developed brief system-wide stalls every 30–60 seconds. WindowServer memory also grew while Cap was in the leaking state. Cleanly quitting Cap stopped the growth; saved recordings were unaffected.
A controlled fresh-launch test did not reproduce the growth: with Cap launched and left untouched, RSS stabilized at 323–324 MB across three consecutive one-minute samples. This suggests that the leak requires retained state from recording/editor use rather than merely launching Cap or running its periodic process-memory sampler.
This may be related to #1589, but that report describes memory retained while a recording is paused. Here, the growth continued for many hours after recording tasks had completed and the app was idle.
Reproduction
This is the sequence that produced the issue; I have not yet reduced it to a single deterministic trigger:
- Launch Cap 0.5.7.
- Make several Studio window recordings using display capture, camera, microphone, and system audio.
- Open/use the Studio editor and stop the recordings normally.
- Leave Cap running after all recording tasks have finished.
- Inspect the periodic
process memory snapshot entries in Cap's log or monitor the process externally.
Expected: memory used by completed recordings/editor sessions is released and RSS stabilizes.
Actual: RSS increases by approximately 17–18 MB per minute until Cap is quit.
All observed capture, encoding, and muxing tasks logged successful completion or normal cancellation. The camera reported zero dropped frames, and the encoder did not time out.
Evidence
Selected Cap log snapshots from the leaking session:
2026-07-20 17:53:31 rss_mb=393
2026-07-20 17:54:31 rss_mb=411
2026-07-20 17:55:31 rss_mb=428
2026-07-20 17:56:31 rss_mb=382 # camera window closed just before this
2026-07-20 17:57:31 rss_mb=400
2026-07-20 19:00:31 rss_mb=1507
2026-07-20 23:59:31 rss_mb=7773
2026-07-21 23:59:31 rss_mb=8011 # machine slept for part of this interval
2026-07-22 15:14:50 rss_mb=13135 # clean app exit begins
External inspection near the end of the session:
Cap RSS: ~13.4 GB
Cap physical footprint: 25.0 GB (`vmmap`)
Fresh-launch idle control on the same machine and version:
2026-07-22 15:26:07 rss_mb=323
2026-07-22 15:27:07 rss_mb=323
2026-07-22 15:28:07 rss_mb=324
Cap's frame WebSocket continued reporting approximately 30 FPS / 17.7–18.0 MB/s during the fresh idle control, while RSS remained flat. That stream therefore does not appear sufficient by itself to cause the leak, though retained recording/editor consumers or cleanup may be relevant.
Additional context
- Cap: 0.5.7
- macOS: 26.3 (25D125)
- Hardware: Apple M4 Max, 128 GB RAM
- Display: Samsung C49RG9x, 3840×1080 at 60 Hz
- Camera: Logitech HD Pro Webcam C920, 1280×720 at 30 FPS
- Recording mode: Studio, with display/window capture, camera, microphone, and system audio
The complete logs contain local recording titles and filesystem paths, so I have included sanitized excerpts here. I can provide a more focused diagnostic extract or run a specific reproduction matrix if maintainers identify the most useful state transitions to test.
[macOS] Cap 0.5.7 leaks ~17–18 MB/min after Studio recording/editor use until quit
Description
On macOS 26.3, Cap 0.5.7 entered a stable, linear memory-growth state after several Studio recordings and editor use. The recording pipeline had finished successfully and Cap was no longer recording, but Cap's own once-per-minute process snapshots continued increasing by approximately 17–18 MB every minute until the process reached 13.1 GB RSS. A later
vmmapsample reported a 25 GB physical footprint.During this period, the machine developed brief system-wide stalls every 30–60 seconds. WindowServer memory also grew while Cap was in the leaking state. Cleanly quitting Cap stopped the growth; saved recordings were unaffected.
A controlled fresh-launch test did not reproduce the growth: with Cap launched and left untouched, RSS stabilized at 323–324 MB across three consecutive one-minute samples. This suggests that the leak requires retained state from recording/editor use rather than merely launching Cap or running its periodic process-memory sampler.
This may be related to #1589, but that report describes memory retained while a recording is paused. Here, the growth continued for many hours after recording tasks had completed and the app was idle.
Reproduction
This is the sequence that produced the issue; I have not yet reduced it to a single deterministic trigger:
process memory snapshotentries in Cap's log or monitor the process externally.Expected: memory used by completed recordings/editor sessions is released and RSS stabilizes.
Actual: RSS increases by approximately 17–18 MB per minute until Cap is quit.
All observed capture, encoding, and muxing tasks logged successful completion or normal cancellation. The camera reported zero dropped frames, and the encoder did not time out.
Evidence
Selected Cap log snapshots from the leaking session:
External inspection near the end of the session:
Fresh-launch idle control on the same machine and version:
Cap's frame WebSocket continued reporting approximately 30 FPS / 17.7–18.0 MB/s during the fresh idle control, while RSS remained flat. That stream therefore does not appear sufficient by itself to cause the leak, though retained recording/editor consumers or cleanup may be relevant.
Additional context
The complete logs contain local recording titles and filesystem paths, so I have included sanitized excerpts here. I can provide a more focused diagnostic extract or run a specific reproduction matrix if maintainers identify the most useful state transitions to test.