Note: I chose SlimDX for a topic prefix, but actually I'm using SharpDX (that wasn't an option in the list), but the code is virtually identical. I'm using C# in VS.NET, and no other API that would be relevant to these graphical issues.
Anyway, the problem I'm having is that when I run my program for a couple minutes, it crashes with an exception that says I have a memory leak. It's a very educated guess that it's being caused by these stupid DataStream objects, because there's really nothing else in the code that could possibly be causing it.
I need to be able to change the vertices within the stream at any time, so I tried setting the position to 0 at every frame and rewriting all the data, but that doesn't seem to work. So I tried disposing of the stream and recreating it and rewriting the data every frame, but I still get the memory leak.
How exactly am I supposed to use these streams and still be able to modify my data? Isn't there a better way to store the data as just an array or something and then use that instead of a stream, and change the values whenever I want? I NEED to be able to move vertices in any way I want at any time.
Unfortunately, I really can't provide source code, so please don't request it. But this is more of a conceptual issue, not specifically about code.