Raytracer fails to release/destroy some worker threads when anitialiasing is enabled.
Load a scene file.
Attach a profiler to JVM.
Start Raytaracer. Enable antialiasing.
In profiler, observe thread count increase by 2*HWcores + 1.
When frame finishes rendering, threads decrease by HWcores +1
Closing render preview does NOT release threads.
Repeats for each rendered frame, whether initiated as single frame render or as part of a movie render.
Threads are visible in profiler (JvisualVM) under threads, and in thread dump, but NOT heap dump. Thread state is listed as 'watitng'
Memory allocated memory per thread depends on render settings. Basic settings start at ~6MB/thread and go up.
Over long rendering sessions, or in JVMs with limited resources, this can add up to an OOM Error, Or can prevent GC from running, which causes an application freeze.