When I repeatedly invoke HardwareControler.read JNI method to get data from UART port, dalvik vm report a memory leak problem. I guess it's caused by no matching release for the data buffer: static public native int read(int fd, byte[] buf, int len); The stack trace is as follows: -------------------------------------------------------------------- W/dalvikvm( 2286): JNI pinned array reference table summary (1024 entries): W/dalvikvm( 2286): 1022 of [B 28B (2 unique) W/dalvikvm( 2286): 2 of [B 532B (2 unique) W/dalvikvm( 2286): Memory held directly by tracked refs is 1120 bytes E/dalvikvm( 2286): Failed adding to JNI pinned array ref table (1024 entries) I/dalvikvm( 2286): "IrKeyReceiver" prio=5 tid=11 RUNNABLE I/dalvikvm( 2286): | group="main" sCount=0 dsCount=0 obj=0x40684028 self=0x1f8 090 I/dalvikvm( 2286): | sysTid=2296 nice=0 sched=0/0 cgrp=bg_non_interactive hand le=2064144 I/dalvikvm( 2286): | schedstat=( 10000000 40000000 742 ) I/dalvikvm( 2286): at com.friendlyarm.AndroidSDK.HardwareControler.read(Native Method)