Closes #1283: Add custom Callable to prevent memory leaks

This commit is contained in:
yueh
2015-08-06 23:30:26 +02:00
committed by thatsIch
parent 20a6e7631f
commit 621952e37d
10 changed files with 163 additions and 77 deletions
+5 -3
View File
@@ -20,13 +20,15 @@ package appeng.me.cache.helpers;
import java.util.HashMap;
import java.util.concurrent.Callable;
import net.minecraft.world.World;
import appeng.api.networking.IGridNode;
import appeng.parts.p2p.PartP2PTunnelME;
import appeng.util.IWorldCallable;
public class Connections implements Callable
public class Connections implements IWorldCallable<Void>
{
public final HashMap<IGridNode, TunnelConnection> connections = new HashMap<IGridNode, TunnelConnection>();
@@ -40,7 +42,7 @@ public class Connections implements Callable
}
@Override
public Object call() throws Exception
public Void call( World world ) throws Exception
{
this.me.updateConnections( this );