Build: 2025.33230 · macOS 26.6.2 · Apple M3 Max
A Render TOP whose Render parameter is off still cooks when something pulls it. Once GPU cook timing is active, every such cook leaks between 128 bytes and about 1.6 KB of heap that is never freed. Timing becomes active as soon as anything reads any operator’s gpuCookTime. The leak also makes every GPU operator’s cook slower, so the project gradually loses frame rate. A restart clears it.
Repro: the attached render_off_leak.toe is a blank project with one COMP:
render_scene: an ordinary lit render, cooked once a frame.exec_cookreads itsgpuCookTimeevery frame, as a performance readout would.render1: Render off, no geometry or lights, force-cooked 100 times a frame byexec_cook.trail1: plots the process’s resident memory (fromps, once a second), fps and frame time.
In a fresh TouchDesigner with nothing else open:
- Resident memory climbs about 3 to 6 MB/s: 1514 → 1803 MB in 48 s.
- fps falls as it grows: 56 at 10 s, 27 at 30 s, 17 at 60 s, 15 at 80 s.
- With Render On set to 1 (the COMP’s Repro page), the same cooks leak nothing.
- With nothing reading
gpuCookTimeat all, nothing leaks either: 400k to 700k Render-off cooks, four runs, flat memory. - After the reads stop, it keeps leaking (measured for 35 s), so GPU timing seems to stay enabled.
What leaks: comparing two heap <pid> snapshots by block size, each Render-off cook in this repro leaves one 1.25 KB block, one 128-byte, one 32-byte and two 48-byte blocks. In some other setups only the 128-byte block leaks. The Perform CHOP’s CPU Mem Used doesn’t show it; the process’s memory does.
How I ran into it: a reflection-probe component keeps its unused cube-map capture at Render off. Its material reads that capture every frame through a Feedback TOP, so the Render TOP cooks every frame, and the component’s cost readout reads gpuCookTime once a second.
- After 7.5 hours (about 600k leaked sets), every TOP and POP took about 1.8 ms of CPU per cook instead of 0.06 ms.
- The project fell from 60+ fps to 10–12 fps.
- Adding 100k sets on purpose, with nothing else changed, raised unrelated GPU operators’ cook time from 1.75 to 1.92 ms: about 2 ns per leaked set per cook.
Workaround for now: don’t let anything pull a Render TOP whose Render is off, and don’t read gpuCookTime continuously.
render_off_leak.toe (6.3 KB)