Merge branch 'fix-mem-leak' into 'master'

fix mem leak

See merge request official-plugins/apollyon!10
This commit is contained in:
Harmonic 2022-03-06 22:17:45 +00:00
commit 38226dacda
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;
@ -84,7 +85,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);
}
}
}