From 956ed8f4ee33f3526f7acaf183750987a27b372c Mon Sep 17 00:00:00 2001 From: Ge Wang Date: Wed, 20 Nov 2024 21:35:18 -0800 Subject: [PATCH] add comments for prune_ugens() --- src/core/chuck_vm.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/core/chuck_vm.cpp b/src/core/chuck_vm.cpp index 1d94f86f1..d2b7c19f9 100644 --- a/src/core/chuck_vm.cpp +++ b/src/core/chuck_vm.cpp @@ -1918,8 +1918,13 @@ void Chuck_VM_Shred::detach_ugens() // advance the iterator iter++; } - // prune + + // prune ugens still associated with the shred + // as of 1.5.4.2 this is no longer necessary in the general and non-OTF + // case; but for OTF replace and remove, this will conservatively release + // ugens (e.g., with refcount==1); see prune_ugens() for more info prune_ugens(); + // clear map m_ugen_map.clear(); }