Fix compiler error for poly_ptr in memory component on clang