Fixed memory leak by forcing garbage collection

This commit is contained in:
Michael Rausch
2017-09-28 14:22:33 +13:00
parent 9795083d4d
commit 3345734efd
2 changed files with 21 additions and 1 deletions
@@ -158,7 +158,13 @@ public abstract class Message {
* @return The current buffer as a byte array
*/
public byte[] getBuffer(){
return buffer.array();
byte[] bytes = buffer.array();
// buffer.reset();
// buffer.clear();
// buffer = null;
return bytes;
}
/**