AudioFlinger: Move NBLog thread_local to no linkage.
Access the thread_local by getter/setter only.
This prevents a memory leak with the clang compiler.
Test: adb shell dumpsys media.audio_flinger --unreachable
Bug: 284657986
Merged-In: Ic7128eea2aef47289c6e38ebca6fb5292d919410
Change-Id: Ic7128eea2aef47289c6e38ebca6fb5292d919410
(cherry picked from commit 5a5b514ac4673a82f665ebc230174a6a4a802632)
diff --git a/services/audioflinger/Threads.cpp b/services/audioflinger/Threads.cpp
index 20f9470..654f506 100644
--- a/services/audioflinger/Threads.cpp
+++ b/services/audioflinger/Threads.cpp
@@ -3833,7 +3833,7 @@
bool AudioFlinger::PlaybackThread::threadLoop()
NO_THREAD_SAFETY_ANALYSIS // manual locking of AudioFlinger
{
- tlNBLogWriter = mNBLogWriter.get();
+ aflog::setThreadWriter(mNBLogWriter.get());
Vector< sp<Track> > tracksToRemove;