tracing: fix TracingController cleanup
This fixes an incorrect deletion of the TracingController
instance,
which in some environments could cause an error about an invalid
pointer passed to free()
. The TracingController
instance is
actually owned by a unique_ptr
member of the platform, so calling
platform::SetTracingController(nullptr)
is the correct way to
delete it. But before that, the TraceBuffer
must be deleted in
order for the tracing loop to exit; that is accomplished by calling
TracingController::Initialize(nullptr)
.
Checklist
-
make -j4 test
(UNIX), orvcbuild test
(Windows) passes -
tests and/or benchmarks are included -
documentation is changed or added -
commit message follows commit guidelines
Affected core subsystem(s)
tracing