Skip to content

Commit b36714d

Browse files
committed
开启DUMP_LEAKS flags
1 parent 70e00bf commit b36714d

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

unity/native_src/papi-quickjs/source/CppObjectMapperQuickjs.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -364,6 +364,8 @@ void CppObjectMapper::Initialize(JSContext* ctx_)
364364
ctx = ctx_;
365365
rt = JS_GetRuntime(ctx);
366366
JS_SetRuntimeOpaque1(rt, this);
367+
// 0x4000: DUMP_LEAKS, 0x8000: DUMP_ATOM_LEAKS
368+
JS_SetDumpFlags(rt, 0x4000 | 0x8000);
367369
//new (&CDataCache) eastl::unordered_map<const void*, FObjectCacheNode, eastl::hash<const void*>,
368370
// eastl::equal_to<const void*>, eastl::allocator_malloc>();
369371
//new (&TypeIdToFunctionMap) eastl::unordered_map<const void*, JSValue, eastl::hash<const void*>,

0 commit comments

Comments
 (0)