Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Attempted to read or write protected memory. This is often an indication that other memory is corrupt.

0
0
Hi Praveen,

Be sure to dispose each instance of V8ScriptEngine when you're done with it. That's absolutely essential in an application that uses multiple instances, as each one holds significant unmanaged resources that .NET's garbage collector can't track.

In addition, be careful with the number of active (undisposed) instances you have at a time. Each V8 runtime reserves a large chunk of address space, and a 32-bit process can easily reach the point of exhaustion with just a few dozen instances. For concurrent execution of multiple scripts, consider using a pool of engines, with a fixed size that's roughly equal to your CPU core count.

Good luck!

Viewing all articles
Browse latest Browse all 2297

Latest Images

Trending Articles





Latest Images