]> git.cworth.org Git - apitrace/blobdiff - trace_write.cpp
Cleanup the state after closing the trace write
[apitrace] / trace_write.cpp
index 6a44b28c231698ce8eff059f590b519d480c567d..7167d35dfb8033b6c60155acd927b7937de1d04b 100644 (file)
@@ -148,10 +148,6 @@ void Open(void) {
     }
 }
 
-void Close(void) {
-    _Close();
-}
-
 static unsigned call_no = 0;
 
 inline bool lookup(std::vector<bool> &map, size_t index) {
@@ -169,6 +165,15 @@ static std::vector<bool> enums;
 static std::vector<bool> bitmasks;
 
 
+void Close(void) {
+    _Close();
+    call_no = 0;
+    functions = std::vector<bool>();
+    structs = std::vector<bool>();
+    enums = std::vector<bool>();
+    bitmasks = std::vector<bool>();
+}
+
 unsigned BeginEnter(const FunctionSig &function) {
     OS::AcquireMutex();
     Open();