Simplify reference counting in Js5Service

Spotted by Polar.

Signed-off-by: Graham <gpe@openrs2.org>
master
Graham 2 years ago
parent 62df015ad5
commit 9d3282ca3a
  1. 4
      game/src/main/kotlin/org/openrs2/game/net/js5/Js5Service.kt

@ -62,9 +62,7 @@ public class Js5Service @Inject constructor(
alloc.buffer().use { uncompressed -> alloc.buffer().use { uncompressed ->
masterIndex.write(uncompressed) masterIndex.write(uncompressed)
Js5Compression.compress(uncompressed, Js5CompressionType.UNCOMPRESSED).use { compressed -> Js5Compression.compress(uncompressed, Js5CompressionType.UNCOMPRESSED)
compressed.retain()
}
} }
} else { } else {
try { try {

Loading…
Cancel
Save