Hi Kenn -- For simple scenes that render at 60hz, the operation of writing to
disk is inherently slower than rendering. This is the entire purpose of the
osgwTools::ScreenCapture class: to perform the disk writes in a separate thread,
so that it doesn't block rendering.
In order to work properly, osgwTools::ScreenCapture keeps a queue of images that
have been captured and are waiting to be written. Because the disk writes are
slower than rendering, this queue typically grows over time, increasing the
memory footprint. Later, when you toggle capture off (or hit escape to halt
rendering), the write thread continues to process the queue, and the memory
footprint shrinks accordingly. For this reason, I believe there is no memory leak.
Hope that helps,
-Paul