Merge branch 'fix-mem-leak' into 'master'
fix mem leak See merge request official-plugins/apollyon!10
This commit is contained in:
commit
38226dacda
@ -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;
|
||||||
@ -84,7 +85,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