Metal: Remove incorrect AutoObjCPtr construct on T && The T && constructor and operator= were incorrectly marked up as "ownership transfer", clearing the source. However, there is no ownership transfer in the assignment, and the call sites only work due to the T source holding is never unretained directly. Consider correct sequence (T is NSMutableArray *): NSMutableArray *obj = [[NSMutableArray alloc] init]; AutoObjCPtr<NSMutableArray *> myHolder = std::move(obj); [obj release]; Since the construct was retaining, the correct operation would need a release on the original raw obj-c pointer. However, the T && constructor would clear out the raw obj-c pointer, and thus calling release on the original pointer would not be possible. Remove the T && constructor, and use just normal T constructor. There's no ownership transfer when constructing AutoObjCPtr -- it is a retaining operation. The constructor does need T &&, raw obj-c objects are just passed normally as pointers, T. Call sites keep their std::move()s, which are no-ops. When functions accepting obj-c pointers get changed to accepting AutoObjCPtrs, the move will start actually transferring the ownership. Bug: angleproject:393263506 Change-Id: I5847f2ec98ab372343d0d2559c92dee9a327e126 Reviewed-on: https://chromium-review.googlesource.com/c/angle/angle/+/6219316 Auto-Submit: Kimmo Kinnunen <kkinnunen@apple.com> Commit-Queue: Geoff Lang <geofflang@chromium.org> Reviewed-by: Geoff Lang <geofflang@chromium.org>