Click or drag to resize
Ab4d.SharpEngine logo

SceneCleanup Method

Cleanup method can perform various cleanup actions. It can dispose the SceneNodes (and their meshes and materials) that were removed from the RootNode. It can dispose GPU resources that were scheduled to be disposed after a frame has been rendered. It can also check all memory blocks and free those that are empty (if freeEmptyMemoryBlocks is true or when it empty for at least EngineRuntimeOptions.FramesCountToReleaseEmptyMemoryBlock frames).

Namespace: Ab4d.SharpEngine
Assembly: Ab4d.SharpEngine (in Ab4d.SharpEngine.dll) Version: 4.1.9680+a1b1e43de1ad9a7e35472c33948d688d7b40ef79
Syntax
C#
public void Cleanup(
	bool disposeDisconnectedSceneNodes = false,
	bool disposeMaterialsOnDisconnectedSceneNodes = false,
	bool disposeMeshesOnDisconnectedSceneNodes = false,
	bool cleanAllSceneCaches = false,
	bool freeEmptyMemoryBlocks = true
)

Parameters

disposeDisconnectedSceneNodes  Boolean  (Optional)
when true (false by default) then the SceneNodes that were removed from the RootNode are disposed
disposeMaterialsOnDisconnectedSceneNodes  Boolean  (Optional)
when true (false by default) and when disposeDisconnectedSceneNodes is true, then the Materials that were assigned to SceneNode that were removed from the RootNode are disposed
disposeMeshesOnDisconnectedSceneNodes  Boolean  (Optional)
when true (false by default) and when disposeDisconnectedSceneNodes is true, then the Meshes that were assigned to SceneNode that were removed from the RootNode are disposed
cleanAllSceneCaches  Boolean  (Optional)
when true (false by default) then all scene caches are cleared
freeEmptyMemoryBlocks  Boolean  (Optional)
when true, the empty memory block is immediately freed; when false the empty memory block is freed if it is empty for at least EngineRuntimeOptions.FramesCountToReleaseEmptyMemoryBlock frames
See Also