From 90722d254e45a2d33ba4879cfa76fdcf5ffd5765 Mon Sep 17 00:00:00 2001 From: Steven Moreland Date: Tue, 10 May 2022 22:57:49 +0000 Subject: [PATCH] Doc Thread requirement. Fixes: 230893354 Test: N/A Change-Id: I426184840c7bf61fe3369388cfc6db184470acf0 --- libutils/include/utils/Thread.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/libutils/include/utils/Thread.h b/libutils/include/utils/Thread.h index fc67656b4..5cf6b47a5 100644 --- a/libutils/include/utils/Thread.h +++ b/libutils/include/utils/Thread.h @@ -42,7 +42,9 @@ class Thread : virtual public RefBase { public: // Create a Thread object, but doesn't create or start the associated - // thread. See the run() method. + // thread. See the run() method. This object must be used with RefBase/sp, + // like any other RefBase object, because they are conventionally promoted + // from bare pointers (Thread::run is particularly problematic here). explicit Thread(bool canCallJava = true); virtual ~Thread();