Replace malloc to new
Zero-clear by memset
Swap by std::swap
Remove bitmapUtil.h
Fix the compile error