本文整理汇总了C++中PseudoStack::deref方法的典型用法代码示例。如果您正苦于以下问题:C++ PseudoStack::deref方法的具体用法?C++ PseudoStack::deref怎么用?C++ PseudoStack::deref使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类PseudoStack
的用法示例。
在下文中一共展示了PseudoStack::deref方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Stack
StackOwningThreadInfo::~StackOwningThreadInfo()
{
PseudoStack* stack = Stack();
if (stack) {
stack->deref();
}
}
示例2: mozilla_sampler_shutdown
void mozilla_sampler_shutdown()
{
sInitCount--;
if (sInitCount > 0)
return;
// Save the profile on shutdown if requested.
TableTicker *t = tlsTicker.get();
if (t) {
const char *val = PR_GetEnv("MOZ_PROFILER_SHUTDOWN");
if (val) {
std::ofstream stream;
stream.open(val);
if (stream.is_open()) {
t->ToStreamAsJSON(stream);
stream.close();
}
}
}
profiler_stop();
set_stderr_callback(nullptr);
Sampler::Shutdown();
PseudoStack *stack = tlsPseudoStack.get();
stack->deref();
tlsPseudoStack.set(nullptr);
}
示例3: mozilla_sampler_unregister_thread
void mozilla_sampler_unregister_thread()
{
// Don't check sInitCount count here -- we may be unregistering the
// thread after the sampler was shut down.
if (!stack_key_initialized) {
return;
}
PseudoStack *stack = tlsPseudoStack.get();
if (!stack) {
return;
}
stack->deref();
tlsPseudoStack.set(nullptr);
Sampler::UnregisterCurrentThread();
}
示例4: mozilla_sampler_shutdown
void mozilla_sampler_shutdown()
{
sInitCount--;
if (sInitCount > 0)
return;
// Save the profile on shutdown if requested.
GeckoSampler *t = tlsTicker.get();
if (t) {
const char *val = getenv("MOZ_PROFILER_SHUTDOWN");
if (val) {
std::ofstream stream;
stream.open(val);
if (stream.is_open()) {
t->ToStreamAsJSON(stream);
stream.close();
}
}
}
profiler_stop();
#ifndef SPS_STANDALONE
set_stderr_callback(nullptr);
#endif
Sampler::Shutdown();
#ifdef SPS_STANDALONE
mozilla::TimeStamp::Shutdown();
#endif
PseudoStack *stack = tlsPseudoStack.get();
stack->deref();
tlsPseudoStack.set(nullptr);
#ifdef MOZ_TASK_TRACER
mozilla::tasktracer::ShutdownTaskTracer();
#endif
}