fix mem leak
This commit is contained in:
parent
3762dc3ad3
commit
87caa5cbe5
@ -7,6 +7,7 @@ import com.eu.habbo.messages.outgoing.camera.CameraURLComposer;
|
|||||||
import com.eu.habbo.messages.outgoing.generic.alerts.GenericAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.GenericAlertComposer;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.ByteBufInputStream;
|
import io.netty.buffer.ByteBufInputStream;
|
||||||
|
import io.netty.util.ReferenceCountUtil;
|
||||||
import org.krews.apollyon.ftp.FTPUploadService;
|
import org.krews.apollyon.ftp.FTPUploadService;
|
||||||
import org.krews.apollyon.utils.PngSignatureChecker;
|
import org.krews.apollyon.utils.PngSignatureChecker;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
@ -82,7 +83,8 @@ public class CameraRoomPictureEvent extends MessageHandler {
|
|||||||
this.client.sendResponse(new CameraURLComposer(URL));
|
this.client.sendResponse(new CameraURLComposer(URL));
|
||||||
}
|
}
|
||||||
} finally {
|
} finally {
|
||||||
image.release();
|
ReferenceCountUtil.release(image);
|
||||||
|
ReferenceCountUtil.release(imageCopy);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,7 @@ import com.eu.habbo.messages.outgoing.camera.CameraRoomThumbnailSavedComposer;
|
|||||||
import com.eu.habbo.messages.outgoing.generic.alerts.GenericAlertComposer;
|
import com.eu.habbo.messages.outgoing.generic.alerts.GenericAlertComposer;
|
||||||
import io.netty.buffer.ByteBuf;
|
import io.netty.buffer.ByteBuf;
|
||||||
import io.netty.buffer.ByteBufInputStream;
|
import io.netty.buffer.ByteBufInputStream;
|
||||||
|
import io.netty.util.ReferenceCountUtil;
|
||||||
import org.krews.apollyon.ftp.FTPUploadService;
|
import org.krews.apollyon.ftp.FTPUploadService;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
@ -71,7 +72,7 @@ public class CameraRoomThumbnailEvent extends MessageHandler {
|
|||||||
|
|
||||||
this.client.sendResponse(new CameraRoomThumbnailSavedComposer());
|
this.client.sendResponse(new CameraRoomThumbnailSavedComposer());
|
||||||
} finally {
|
} finally {
|
||||||
image.release();
|
ReferenceCountUtil.release(image);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user