I am putting my interaction with the REngine (and R.NET) behind a WCF Service. It was previously working ok, but as soon as I implemented IDisposable in the Adapter (that calls R.NET) that's called by my WCF Service, I am getting an error on 2nd call where it's timing out on the following method:
GetFunction<setup_Rmainloop>()();
Or it's showing that the engine is already disposed when it checks for that in the engine initialization.
I dispose of the engine after it's been used and each time coming into the service I check to see if the engine needs to be created and initialized or not. Calling from a Console or windows application does not have this issue. So I guess calling from a Web-based application, something is keeping the engine from being completely disposed or cached and this is causing the issue?
If I remove the call to the Dispose() method in my Adapter, which is called by a WCF service then it runs fine. So, should I not dispose of the engine when being used from a web-based application? Just wondering if anyone else was having issues with disposing of the engine in a web environment.
thanks.
GetFunction<setup_Rmainloop>()();
Or it's showing that the engine is already disposed when it checks for that in the engine initialization.
I dispose of the engine after it's been used and each time coming into the service I check to see if the engine needs to be created and initialized or not. Calling from a Console or windows application does not have this issue. So I guess calling from a Web-based application, something is keeping the engine from being completely disposed or cached and this is causing the issue?
If I remove the call to the Dispose() method in my Adapter, which is called by a WCF service then it runs fine. So, should I not dispose of the engine when being used from a web-based application? Just wondering if anyone else was having issues with disposing of the engine in a web environment.
thanks.