fix mem leak

This commit is contained in:
Dank074 2021-02-26 21:14:45 -06:00
parent 3762dc3ad3
commit 87caa5cbe5
2 changed files with 5 additions and 2 deletions

View File

@ -7,6 +7,7 @@ import com.eu.habbo.messages.outgoing.camera.CameraURLComposer;
import com.eu.habbo.messages.outgoing.generic.alerts.GenericAlertComposer;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufInputStream;
import io.netty.util.ReferenceCountUtil;
import org.krews.apollyon.ftp.FTPUploadService;
import org.krews.apollyon.utils.PngSignatureChecker;
import org.slf4j.Logger;
@ -82,7 +83,8 @@ public class CameraRoomPictureEvent extends MessageHandler {
this.client.sendResponse(new CameraURLComposer(URL));
}
} finally {
image.release();
ReferenceCountUtil.release(image);
ReferenceCountUtil.release(imageCopy);
}
}
}

View File

@ -7,6 +7,7 @@ import com.eu.habbo.messages.outgoing.camera.CameraRoomThumbnailSavedComposer;
import com.eu.habbo.messages.outgoing.generic.alerts.GenericAlertComposer;
import io.netty.buffer.ByteBuf;
import io.netty.buffer.ByteBufInputStream;
import io.netty.util.ReferenceCountUtil;
import org.krews.apollyon.ftp.FTPUploadService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -71,7 +72,7 @@ public class CameraRoomThumbnailEvent extends MessageHandler {
this.client.sendResponse(new CameraRoomThumbnailSavedComposer());
} finally {
image.release();
ReferenceCountUtil.release(image);
}
}
}