/** * Delete any textures from the card that have been recently garbage collected in Java. If a deleter is passed in, * gc'd textures that are part of the currently active context (if one is active) will be deleted immediately. If a * deleter is not passed in, we do not have an active context, or we encounter gc'd textures that are not part of * the current context, then we will queue those textures to be deleted later using the GameTaskQueueManager. * * If a non null map is passed into futureStore, it will be populated with Future objects for each queued context. * These objects may be used to discover when the deletion tasks have all completed. * * @param deleter * if not null, this renderer will be used to immediately delete any gc'd textures in the currently * active context. All other gc'd textures will be queued to delete in their own contexts. * @param futureStore * if not null, this map will be populated with any Future task handles created during cleanup. */ public static void cleanExpiredTextures(final Renderer deleter, final Map<Object, Future<Void>> futureStore) { // gather up expired textures... final Multimap<Object, Integer> idMap = gatherGCdIds(); // send to be deleted on next render. if (idMap != null) { handleTextureDelete(deleter, idMap, futureStore); } }
/** * Delete any textures from the card that have been recently garbage collected in Java. If a deleter is passed in, * gc'd textures that are part of the currently active context (if one is active) will be deleted immediately. If a * deleter is not passed in, we do not have an active context, or we encounter gc'd textures that are not part of * the current context, then we will queue those textures to be deleted later using the GameTaskQueueManager. * * If a non null map is passed into futureStore, it will be populated with Future objects for each queued context. * These objects may be used to discover when the deletion tasks have all completed. * * @param utils * if not null, this will be used to immediately delete any gc'd textures in the currently active * context. All other gc'd textures will be queued to delete in their own contexts. * @param futureStore * if not null, this map will be populated with any Future task handles created during cleanup. */ public static void cleanExpiredTextures(final ITextureUtils utils, final Map<RenderContextRef, Future<Void>> futureStore) { // gather up expired textures... final Multimap<RenderContextRef, Integer> idMap = gatherGCdIds(); // send to be deleted on next render. if (idMap != null) { handleTextureDelete(utils, idMap, futureStore); } }
final Map<RenderContextRef, Future<Void>> futureStore) { Multimap<RenderContextRef, Integer> idMap = gatherGCdIds();
final Map<Object, Future<Void>> futureStore) { Multimap<Object, Integer> idMap = gatherGCdIds();
Multimap<Object, Integer> idMap = gatherGCdIds();
final Map<RenderContextRef, Future<Void>> futureStore) { Multimap<RenderContextRef, Integer> idMap = gatherGCdIds();