Test about using numpy to alloccate buffer
Fixed the memory leak