Refine ContextManager
- Add isManagingContext API
- Remove global lock and global variable (use Singleton instead)
- Encapsulate getSlotIndexFromAddress API
- Extract configurable define to Config.h
diff --git a/lib/bcc/ScriptCompiled.cpp b/lib/bcc/ScriptCompiled.cpp
index 5fd45b6..7aa29f1 100644
--- a/lib/bcc/ScriptCompiled.cpp
+++ b/lib/bcc/ScriptCompiled.cpp
@@ -27,7 +27,7 @@
ScriptCompiled::~ScriptCompiled() {
// Deallocate the BCC context
if (mContext) {
- deallocateContext(mContext);
+ ContextManager::get().deallocateContext(mContext);
}
// Delete the emitted function information