Wpf |
public void ClearWpfObjects()
ClearWpfObjects clears all references to WPF objects that were used to create this WpfOptimizedModel3DGroupNode. This can free a lot of memory for GC.
The method sets the Model3DGroup to null and also clears a few private collections that hold references to the WPF objects.
IMPORTANT:
Note that before the WPF objects can be freed by GC, you also need to remove its usage from the Viewport3D child objects.
This can be done with adding this SceneNode to DXScene or with using SceneNodeVisual3D.