BitmapCache fine tune.
support bitmap cache in native memory.
fix leak memory.
Signed-off-by: qijiang.guo <qijiang.guo@gmail.com>