aboutsummaryrefslogtreecommitdiff
path: root/src/org/traccar/protocol/Pt502ProtocolDecoder.java
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2018-06-10 10:55:06 +1200
committerAnton Tananaev <anton.tananaev@gmail.com>2018-06-10 10:55:06 +1200
commit1dc1e06cfd4b7b23775984a254723b2d06b4f1dd (patch)
tree6dd89b120a7400ff3f08b2cb213cadc27112d0e7 /src/org/traccar/protocol/Pt502ProtocolDecoder.java
parent58a222ba3d546dc2366586f2c904e70680a394bd (diff)
downloadtrackermap-server-1dc1e06cfd4b7b23775984a254723b2d06b4f1dd.tar.gz
trackermap-server-1dc1e06cfd4b7b23775984a254723b2d06b4f1dd.tar.bz2
trackermap-server-1dc1e06cfd4b7b23775984a254723b2d06b4f1dd.zip
Handle buffers reference count
Diffstat (limited to 'src/org/traccar/protocol/Pt502ProtocolDecoder.java')
-rw-r--r--src/org/traccar/protocol/Pt502ProtocolDecoder.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/org/traccar/protocol/Pt502ProtocolDecoder.java b/src/org/traccar/protocol/Pt502ProtocolDecoder.java
index aec9b0712..e0aea693a 100644
--- a/src/org/traccar/protocol/Pt502ProtocolDecoder.java
+++ b/src/org/traccar/protocol/Pt502ProtocolDecoder.java
@@ -182,7 +182,7 @@ public class Pt502ProtocolDecoder extends BaseProtocolDecoder {
getLastLocation(position, null);
position.set(Position.KEY_IMAGE, Context.getMediaManager().writeFile(uniqueId, photo, "jpg"));
-
+ photo.release();
photo = null;
return position;
@@ -196,7 +196,7 @@ public class Pt502ProtocolDecoder extends BaseProtocolDecoder {
if (type.startsWith("$PHO")) {
int size = Integer.parseInt(type.split("-")[0].substring(4));
if (size > 0) {
- photo = Unpooled.buffer(size); // TODO ref count
+ photo = Unpooled.buffer(size);
requestPhotoFragment(channel);
}
}