[gjs: 17/18] profiler: Call destructor of PseudoStack



commit 8a30bbd358bfb5c09ebe0699376d63b264027deb
Author: Philip Chimento <philip chimento gmail com>
Date:   Sat Dec 7 20:58:12 2019 -0800

    profiler: Call destructor of PseudoStack
    
    Currently leaving this out seems to have been harmless, but in
    SpiderMonkey 68 we will start leaking memory if we don't do this,
    because ProfilingStack (as PseudoStack will be renamed to) owns 4k of
    memory for stack frames.

 gjs/profiler.cpp | 2 ++
 1 file changed, 2 insertions(+)
---
diff --git a/gjs/profiler.cpp b/gjs/profiler.cpp
index 157b5fe7..74c99f07 100644
--- a/gjs/profiler.cpp
+++ b/gjs/profiler.cpp
@@ -270,6 +270,8 @@ _gjs_profiler_free(GjsProfiler *self)
 
     if (self->fd != -1)
         close(self->fd);
+
+    self->stack.~PseudoStack();
 #endif
     g_free(self);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]