On 06/20/2012 05:38 PM, Miller Puckette wrote:
[snip] I'm just saying that the automatic varable t_bindelem *e should be declared at the beginning of the block - no worries about change_bindlist_via_graph.
Ah, now I get it :-). Fixed.
I think bindlist_bang() etc are more critical than pd_unbind as they naturally get called many times while a patch is running whereas pd_unbind is typically called only when objects are deleted. So moving checks from pd_unbind() to bindlist_bang() etc decreases pd's run-time efficiency.
cheers M
OK, how about the attached patch where now I use the change_bindlist_via_graph variable and increment it by one every time something needs to be unbound so when you return back to the bindlist_bang() or whatever call was issued, only if change_bindlist_via_graph > 1 should it call unbind. Now it avoids entering the bindlist_cleanup unless it absolutely has to...
Attached is also a patch that illustrates your case presented earlier which crashed pd-l2ork prior to applying this latest version of the patch.
Cheers!