I am evaluating WPF for use in an application which will need to render tens of thousands of elements (rectangles, lines, circles). The rendering needs to be fast but can be done once and cached - so I've found BitmapCacheBrush is the recommended way of doing this.
However, it seems that when I render to a DrawingVisual and update BitmapCacheBrush.Target to use this, the memory of DrawingVisual is retained.
Is there a way to drop the DrawingVisual once it has been cached as a bitmap? or another way of doing this? (I looked at RenderTargetBitmap but apparently that does not use hardware accelerated rendering)
Thank-you AnonDev