I have a question about the error “Leaked effect refs” and how I am only causing them in specific situations, on intensive SmartRender operations.
I have noticed that when I cancel my plugins operation with the escape key or by simply closing the program mid effect processing I am leaving effect refs hanging, which can lead to just a popup error on exit and sometimes the entire project file having issues reopening saying that a crash has occurred while invoking the plugin. I am doing iterations like from the CCU example and the effect is working great aside from this leaked effects issue (at least I think). I am a little confused when I should be creating my AEGP_EffectRefH and AEGP_StreamRefH objects.
Currently I am calling my SmartRender function, then based on the pixel depth calling a separate function. Inside of that function I am iterating my image via the same method from CCU. Inside of this function I am creating several AEGP_EffectRefH as well as several AEGP_StreamRefH objects disposing of them at the end of the function before returning. When I let the SmartRender complete on its own then all is well and all effect refs are disposed properly, however when I close after effects mid update or cancel the operation mid update I am leaving effect refs hanging on exit.
I do apologize if this is a newbie question, but I cannot find a good example showing how to use the PF_ABORT function, which is what I am assuming I should be calling to acknowledge the users abort request, unless I should be handling it completly differently?
It’s also possible I might be creating AEGP_EffectRefH and AEGP_StreamRefH objects in the wrong place altogether?