ID 70016 - Rendering repeatedly (with multiple AOVs) consumes more and more memory, possibly leading to a crash when running out of memory

Follow

Problem summary
Preview rendering multiple AOVs or high resolution images will fill up the memory and end in a Katana crash.
 
Steps to reproduce
  1. Download the attached project
  2. Open the project in any Katana version from 1.2v2 and up
  3. Right click 'Interactive Render'/ 'Preview Render' on the 'Render' node
  4. Repeat step 3 until Katana crashes.
Workaround
Due to the Catalog implementation, currently all items created from image renders will be stored in memory. To avoid hitting your machine memory limit it is recommended to only Preview Render the primary pass and not all AOVs, and also clear the Catalog items from time to time to slow the memory usage.
 
Expected behaviour
Katana should not crash.
 
Actual behaviour
When running out of memory Katana crashes with messages similar to the following:

ImageAllocator:    mem usage: 4409024512   max mem usage: 4404019200   disk usage: 1114169344   max disk usage: 1108344832   num unlocked images: 757   num locked images: 0Out of Memory: ImageAllocator overran available memory. at Apps/Katana/RENDER2D/src/renderSystem/images/ImageAllocator.cpp:287...Out of Memory: ImageAllocator overran available memory. at Apps/Katana/RENDER2D/src/renderSystem/images/ImageBuffer_Imp.cpp:84Out of Memory: ImageAllocator overran available memory. at Apps/Katana/RENDER2D/src/renderSystem/images/ImageBuffer_Imp.cpp:84

    We're sorry to hear that

    Please tell us why