Samples/Utilities/DebugMemoryLeak.py
17 gTestFilePath = os.path.abspath( os.path.join( gSys.ApplicationPath,
"../../OpenRealitySDK/Scenes/PlasticMan.fbx" ))
19 gEnableDetailTrace =
False
23 print "==========================================================================="
24 print "== Memory Leak Detection for Batch Processing"
26 print "== If you observed steady memory usage increase, it may indicate that there"
27 print "== is memory leak somewhere, either inside your SDK plugin or MoBu kernel."
29 print "== Test File: ", gTestFilePath
30 print "== Batch iterations: ", gBatchCount
31 print "== Enable Detail Trace: ", gEnableDetailTrace
32 print "== Trace Level: ", gNewTraceLevel
33 print "==========================================================================="
41 def TraceMemory(pIter):
42 lTraceMsg =
"Iteration: " + str(pIter) +
" Livings Count: " + str(gObjectLivingCount) +
" Memory: " + str(gSys.ProcessMemory) +
"\n"
46 for lIter
in range (gBatchCount):
50 gApp.FileOpen(gTestFilePath)
62 FBObjectPrintLivings(gGlobalUniqueId)
69 TraceMemory(gBatchCount)