jordanh
1st June 2013, 10:15
I have a win32dll that loads avisynth dll and invokes avisynth scripts this way:
enum { AVISYNTH_INTERFACE_VERSION = 2 };
avsdll = LoadLibrary("avisynth.dll");
CreateEnv = (IScriptEnvironment *(__stdcall *)(int))GetProcAddress(avsdll, "CreateScriptEnvironment");
IScriptEnvironment* outputenv= CreateEnv(AVISYNTH_INTERFACE_VERSION);
The problem is, in the lifetime of my dll, it should be possible to destroy and respawn a lot of environment instances.
When i set env = 0 after using one environment, i am under the impression that a lot of memory is not freed. So the memory consumption of my dll raises all the time.
returnedAVSClip = 0;
env = 0;
FreeLibrary(avsdll);
The question is, can one destroy all the memory that is left over after using an env? I know about the new deleteEnvironment stuff in Interface 5 or 6, but it seems to be a lot of work to port to this intreface, so i would prefer the old version.
Thanks!!
enum { AVISYNTH_INTERFACE_VERSION = 2 };
avsdll = LoadLibrary("avisynth.dll");
CreateEnv = (IScriptEnvironment *(__stdcall *)(int))GetProcAddress(avsdll, "CreateScriptEnvironment");
IScriptEnvironment* outputenv= CreateEnv(AVISYNTH_INTERFACE_VERSION);
The problem is, in the lifetime of my dll, it should be possible to destroy and respawn a lot of environment instances.
When i set env = 0 after using one environment, i am under the impression that a lot of memory is not freed. So the memory consumption of my dll raises all the time.
returnedAVSClip = 0;
env = 0;
FreeLibrary(avsdll);
The question is, can one destroy all the memory that is left over after using an env? I know about the new deleteEnvironment stuff in Interface 5 or 6, but it seems to be a lot of work to port to this intreface, so i would prefer the old version.
Thanks!!