mirror of
https://github.com/Jozufozu/Flywheel.git
synced 2024-11-14 14:33:57 +01:00
Weak assumption
- Use a weak hash set for PipelineCompiler.ALL
This commit is contained in:
parent
efb68dc776
commit
3193e16498
@ -1,8 +1,10 @@
|
||||
package dev.engine_room.flywheel.backend.compile;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Collection;
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Set;
|
||||
import java.util.WeakHashMap;
|
||||
|
||||
import dev.engine_room.flywheel.api.Flywheel;
|
||||
import dev.engine_room.flywheel.api.instance.InstanceType;
|
||||
@ -31,7 +33,7 @@ import dev.engine_room.flywheel.lib.util.ResourceUtil;
|
||||
import net.minecraft.resources.ResourceLocation;
|
||||
|
||||
public final class PipelineCompiler {
|
||||
private static final List<PipelineCompiler> ALL = new ArrayList<>();
|
||||
private static final Set<PipelineCompiler> ALL = Collections.newSetFromMap(new WeakHashMap<>());
|
||||
|
||||
private static final Compile<PipelineProgramKey> PIPELINE = new Compile<>();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user