static new InheritableThreadLocal> dm_currentModule_value; static DynModule dm_currentModule() { ret getWeakRef(dm_currentModule_value!); } svoid _onLoad_dm_currentModule { setOptMC('dm_currentModule_generic, dm_currentModule_value); } // prevent memory leak svoid cleanMeUp_dm_currentModule { dm_currentModule_value = new InheritableThreadLocal; }