WPF Memory Leak

Jan 28, 2012 at 2:57 PM


first of all: I like SharpGL being very easy to use and being the only OpenGL C# Wrapper that works with WPF. I eventually want to use it visualizing large point clouds in a WPF application which i am doing with Dynamic Data Display right now but this approach any usual PC around right now.

However the WPF version happens to see some OutOfMemoryExceptions without the GC.Collect() hack. On the machine i am developing right now this leads to pretty high mem usage and CPU load. 

So my question is, would it be possible to somehow optimize that part of the code? Maybe it would be possible to work with pinned memory here to avaoid creating lots of objects at high frequency. Unfortunately i have no glue yet of how this code works.

Also: The GC.Collect() hack is not in the source code yet. I downloaded the latest check and it did not contain the fix.

Good work so far