various tweaks to make sure we release appropriate references ASAP

This commit is contained in:
jrandom
2004-11-15 14:37:56 +00:00
committed by zzz
parent 3780d290fa
commit 306f6b0037
10 changed files with 86 additions and 22 deletions

View File

@@ -19,12 +19,14 @@ class PacketQueue {
private I2PAppContext _context;
private Log _log;
private I2PSession _session;
private ConnectionManager _connectionManager;
private byte _buf[];
private ByteCache _cache = ByteCache.getInstance(64, 36*1024);
public PacketQueue(I2PAppContext context, I2PSession session) {
public PacketQueue(I2PAppContext context, I2PSession session, ConnectionManager mgr) {
_context = context;
_session = session;
_connectionManager = mgr;
_buf = _cache.acquire().getData(); // new byte[36*1024];
_log = context.logManager().getLog(PacketQueue.class);
}
@@ -95,7 +97,7 @@ class PacketQueue {
+ " con: " + conStr;
_log.debug(msg);
}
PacketHandler.displayPacket(packet, "SEND");
_connectionManager.getPacketHandler().displayPacket(packet, "SEND");
}
}