Closed luithefirst closed 5 years ago
Disabling hooks by shorting "hook" to return "m" in RenderTask.fs Line 555 does not resolve the issue.
The Map2Mod of model and view should no longer be alive, but it is:
preliminary findings: BinaryCache does not work as intended (not fully understood ConditionalWeakTable limitation)
The issue with BinaryCache occurs because the derived attributes also hold a reference to their inputs (Map2Mod). This means the BinaryCache keys are also referenced by the cache entry and this keeps both inputs alive as long as one lives. See tests added in Aardvark.Base: 15be1be5 The issue is resolved by introducing Map2ModWeak that does not hold a strong reference to the input and using that for derived attribute computations: 39a811d5, 1754e947
Inputs of "weak" mapped mods get collected -> see "09 - TextTrafoTest"
Resolved by fix of BinaryCache in Aardvark.Base 4.5.15
Please see "06 - MemoryLeakTest" for demonstration.
Using "ModelView*" transformations in shaders will use hooked view and proj transformations combined with the model transform. This will cause the model transform, its computation and source to leak indefinitely.