svf-lib 1.0.752 → 1.0.753

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Binary file
@@ -120,6 +120,15 @@ public:
120
120
  return extAPI;
121
121
  }
122
122
 
123
+ static void destory()
124
+ {
125
+ if (extAPI != nullptr)
126
+ {
127
+ delete extAPI;
128
+ extAPI = nullptr;
129
+ }
130
+ }
131
+
123
132
  //Return the extf_t of (F).
124
133
  extf_t get_type(const SVFFunction* F) const
125
134
  {
@@ -75,14 +75,9 @@ public:
75
75
  {
76
76
  for (auto * f : FunctionSet)
77
77
  delete f;
78
-
79
- auto * extAPI = ExtAPI::getExtAPI();
80
- delete extAPI;
81
- extAPI = nullptr;
82
78
  NodeIDAllocator::unset();
83
- auto * threadAPI = SVF::ThreadAPI::getThreadAPI();
84
- delete threadAPI;
85
- threadAPI = nullptr;
79
+ ThreadAPI::destroy();
80
+ ExtAPI::destory();
86
81
  }
87
82
 
88
83
  static inline void setPagFromTXT(std::string txt)
@@ -108,6 +108,15 @@ public:
108
108
  return tdAPI;
109
109
  }
110
110
 
111
+ static void destroy()
112
+ {
113
+ if(tdAPI != nullptr)
114
+ {
115
+ delete tdAPI;
116
+ tdAPI = nullptr;
117
+ }
118
+ }
119
+
111
120
  /// Return the callee/callsite/func
112
121
  //@{
113
122
  const SVFFunction* getCallee(const Instruction *inst) const;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "svf-lib",
3
- "version": "1.0.752",
3
+ "version": "1.0.753",
4
4
  "description": "SVF's npm support",
5
5
  "main": "index.js",
6
6
  "scripts": {