use unique_ptr< T [] > instead of array_ptr
remove handmade ptr