changeset 121:bddb8be357f6 working

fix memory leak
author one
date Fri, 27 Jul 2012 00:46:01 +0900
parents 0178acc8ea2c
children d5d9ca4cbe87
files src/alice/datasegment/Receiver.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/alice/datasegment/Receiver.java	Thu Jul 26 15:47:30 2012 +0900
+++ b/src/alice/datasegment/Receiver.java	Fri Jul 27 00:46:01 2012 +0900
@@ -23,6 +23,8 @@
 	public String managerKey; // for debugging
 	public String key; 		  // for debugging
 	
+	private static MessagePack msgpack = new MessagePack();
+	
 	public Receiver(InputDataSegment ids, CommandType type) {
 		this.ids = ids;
 		this.type = type;
@@ -90,7 +92,6 @@
 	}
 	
 	public <T> T asClass(Class<T> clazz) {
-		MessagePack msgpack = new MessagePack();
 		try {
 			return msgpack.convert(val, clazz);
 		} catch (IOException e) {