Thread: Avisynth+
View Single Post
Old 29th December 2019, 23:21   #5018  |  Link
Groucho2004
 
Join Date: Mar 2006
Location: Barcelona
Posts: 5,034
Quote:
Originally Posted by qyot27 View Post
Shouldn't you set environment to NULL before you delete it? I'm not surprised if it crashes when done the other way; I'm pretty sure I had to hammer such a case out of the FFMS2 C-plugin once after changing how the AviSynth library got allocated.
Some info on the old 'delete' for AVS 2.5:
https://forum.doom9.org/showthread.p...te#post1631151

And the benefit of the newer DeleteScriptEnvironment():
https://forum.doom9.org/showthread.p...te#post1512400

When AVSMeter still used the 2.5 interface, I used this to destroy IScriptEnvironment:

AVS_env->~IScriptEnvironment();
AVS_env = 0;
__________________
Groucho's Avisynth Stuff

Last edited by Groucho2004; 29th December 2019 at 23:28.
Groucho2004 is offline