Package com.ardor3d.util
Class ContextGarbageCollector
java.lang.Object
com.ardor3d.util.ContextGarbageCollector
-
Method Summary
Modifier and TypeMethodDescriptionstatic void
doFinalCleanup
(Renderer immediateDelete) Handle cleanup of all open OpenGL assets.static void
doRuntimeCleanup
(Renderer immediateDelete) Handle detecting and scheduling cleanup of OpenGL assets.
-
Method Details
-
doRuntimeCleanup
Handle detecting and scheduling cleanup of OpenGL assets. This method will place delete calls on the task queue of appropriate RenderContexts when an asset such as a Texture is determined to no longer be reachable by Java.- Parameters:
immediateDelete
- an optional Renderer to use for immediate cleanup when the asset is owned by the current context. In general this is best used in single context applications, and null is a perfectly acceptable value.
-
doFinalCleanup
Handle cleanup of all open OpenGL assets. This method is meant to be used on application shutdown.- Parameters:
immediateDelete
- an optional Renderer to use for immediate cleanup when the asset is owned by the current context. In general this is best used in single context applications, and null is a perfectly acceptable value. However, if there is more than one context or null was passed, you must have all of the contexts process at least one more (empty) frame to allow for the final gl calls to be processed.
-