G
Guest
My mixed-mode application repeatedly calls various pre-compiled JScript .NET
DLLs which generate different sorts of reports (e.g. through automation).
This results in a continuous increase of the 'Private Bytes' performance
counter of the application and finally ends in a crash after 2-3 weeks of
operation.
The implementation is done via application domains:
pAppDomain = AppDomain::CreateDomain(...);
pAppDomain -> CreateInstanceFromAndUnwrap(...) -> GetType() ->
InvokeMember(...)
pAppDomain -> Unload(pAppDomain);
The 'InvokeMember' calls a function called 'LoadAndExecute' in a managed DLL
(C++) which itself calls the pre-compiled Script DLLs like this:
pAssembly = Assembly -> LoadFrom(...);
pAssembly -> CreateInstance(...) -> GetType() -> InvokeMember(...);
After the Script DLL has completed and returned control, the application
domain for the managed and Script DLLs is unloaded in order to force a
release of all involved resources. The output is as expected but I cannot
understand the continuous memory consumption.
Can anybody help?
Thanks!
DLLs which generate different sorts of reports (e.g. through automation).
This results in a continuous increase of the 'Private Bytes' performance
counter of the application and finally ends in a crash after 2-3 weeks of
operation.
The implementation is done via application domains:
pAppDomain = AppDomain::CreateDomain(...);
pAppDomain -> CreateInstanceFromAndUnwrap(...) -> GetType() ->
InvokeMember(...)
pAppDomain -> Unload(pAppDomain);
The 'InvokeMember' calls a function called 'LoadAndExecute' in a managed DLL
(C++) which itself calls the pre-compiled Script DLLs like this:
pAssembly = Assembly -> LoadFrom(...);
pAssembly -> CreateInstance(...) -> GetType() -> InvokeMember(...);
After the Script DLL has completed and returned control, the application
domain for the managed and Script DLLs is unloaded in order to force a
release of all involved resources. The output is as expected but I cannot
understand the continuous memory consumption.
Can anybody help?
Thanks!