Click or drag to resize
AB4D logo

WpfOptimizedModel3DGroupNodeClearWpfObjects Method

Clears all references to WPF objects that were used to create this WpfOptimizedModel3DGroupNode. This can free a lot of memory for GC. See remarks for more info.

Namespace: Ab3d.DirectX.Models
Assembly: Ab3d.DXEngine.Wpf (in Ab3d.DXEngine.Wpf.dll) Version: 7.0.8865.1045
Syntax
C#
public void ClearWpfObjects()
Remarks

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.

See Also