Posted by Andrew on 17 July 2014 02:57 PM
Recently a member of the Forums reported receiving an OutOfMemoryException in SciChart when appending 40,000,000 points to a DataSeries.
With .NET4.5, AnyCPU, plenty of RAM and a 64-bit operating system this shouldn’t happen, right? This caught us out too so its worth an article to our user-base.
.NET 4.5 AnyCPU != AnyCPU
In .NET4.5, there is a new project setting next to AnyCPU called Prefer 32-Bit, which is the new default setting, which means “If the process runs on a 64-bit Windows system, it runs as a 32-bit process. IL is compiled to x86 machine code”. Yes, you heard that right. AnyCPU != AnyCPU any more.
How to Resolve the OutOfMemoryException in .NET4.5
So, how do we fix this? Simple really:
Find out more in the video below