mirror of
https://github.com/GTNewHorizons/Applied-Energistics-2-Unofficial.git
synced 2026-11-20 12:19:36 +00:00
Fix memory leak caused by ThreadLocal<RenderBlocksWorkaround> (#1215)
This commit is contained in:
1 parent
74b68b645d
commit
3d2db39f6c
10 files changed
+109
-132
No files matched your search
@@ -66,7 +66,7 @@ public final class BusRenderHelper implements IPartRenderHelper {
|
||||
private int color;
|
||||
|
||||
public BusRenderHelper() {
|
||||
this.bbc = new BoundBoxCalculator(this);
|
||||
this.bbc = new BoundBoxCalculator();
|
||||
this.noAlphaPass = !AEConfig.instance.isFeatureEnabled(AEFeature.AlphaPass);
|
||||
this.bbr = new BaseBlockRender<>();
|
||||
this.renderingForPass = 0;
|
||||
@@ -138,9 +138,8 @@ public final class BusRenderHelper implements IPartRenderHelper {
|
||||
this.maxZ = bounds[5];
|
||||
}
|
||||
|
||||
private static class BoundBoxCalculator implements IPartCollisionHelper {
|
||||
private class BoundBoxCalculator implements IPartCollisionHelper {
|
||||
|
||||
private final BusRenderHelper helper;
|
||||
private boolean started = false;
|
||||
|
||||
private float minX;
|
||||
@@ -151,10 +150,6 @@ public final class BusRenderHelper implements IPartRenderHelper {
|
||||
private float maxY;
|
||||
private float maxZ;
|
||||
|
||||
public BoundBoxCalculator(final BusRenderHelper helper) {
|
||||
this.helper = helper;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addBox(final double minX, final double minY, final double minZ, final double maxX,
|
||||
final double maxY, final double maxZ) {
|
||||
@@ -178,17 +173,17 @@ public final class BusRenderHelper implements IPartRenderHelper {
|
||||
|
||||
@Override
|
||||
public ForgeDirection getWorldX() {
|
||||
return this.helper.ax;
|
||||
return BusRenderHelper.this.ax;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getWorldY() {
|
||||
return this.helper.ay;
|
||||
return BusRenderHelper.this.ay;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ForgeDirection getWorldZ() {
|
||||
return this.helper.az;
|
||||
return BusRenderHelper.this.az;
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in new issue
Block a user