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/ScriptCached.cpp b/lib/bcc/ScriptCached.cpp
index 1003163..183e552 100644
--- a/lib/bcc/ScriptCached.cpp
+++ b/lib/bcc/ScriptCached.cpp
@@ -30,7 +30,7 @@
ScriptCached::~ScriptCached() {
// Deallocate the bcc script context
if (mContext) {
- deallocateContext(mContext);
+ ContextManager::get().deallocateContext(mContext);
}
// Deallocate string pool, exported var list, exported func list