@Test public void testDestroyInstanceModules() throws Exception { testCallModuleMethod(); WXModuleManager.destroyInstanceModules(instance.getInstanceId()); }
public static void destroyInstanceModules(String instanceId) { sDomModuleMap.remove(instanceId); HashMap<String, WXModule> moduleMap = sInstanceModuleMap.remove(instanceId); if (moduleMap == null || moduleMap.size() < 1) { return; } Iterator<Entry<String, WXModule>> iterator = moduleMap.entrySet().iterator(); Entry<String, WXModule> entry; while (iterator.hasNext()) { entry = iterator.next(); WXModule module = entry.getValue(); if(module instanceof Destroyable){ ((Destroyable)module).destroy(); } } }
WXModuleManager { public static void destroyInstanceModules(String instanceId) { sDomModuleMap.remove(instanceId); HashMap<String, WXModule> moduleMap = sInstanceModuleMap.remove(instanceId); if (moduleMap == null || moduleMap.size() < 1) { return; } Iterator<Entry<String, WXModule>> iterator = moduleMap.entrySet().iterator(); Entry<String, WXModule> entry; while (iterator.hasNext()) { entry = iterator.next(); WXModule module = entry.getValue(); if(module instanceof Destroyable){ ((Destroyable)module).destroy(); } } } }
WXModuleManager { public static void destroyInstanceModules(String instanceId) { sDomModuleMap.remove(instanceId); HashMap<String, WXModule> moduleMap = sInstanceModuleMap.remove(instanceId); if (moduleMap == null || moduleMap.size() < 1) { return; } Iterator<Entry<String, WXModule>> iterator = moduleMap.entrySet().iterator(); Entry<String, WXModule> entry; while (iterator.hasNext()) { entry = iterator.next(); WXModule module = entry.getValue(); if(module instanceof Destroyable){ ((Destroyable)module).destroy(); } } }  }
WXModuleManager { public static void destroyInstanceModules(String instanceId) { sDomModuleMap.remove(instanceId); HashMap<String, WXModule> moduleMap = sInstanceModuleMap.remove(instanceId); if (moduleMap == null || moduleMap.size() < 1) { return; } Iterator<Entry<String, WXModule>> iterator = moduleMap.entrySet().iterator(); Entry<String, WXModule> entry; while (iterator.hasNext()) { entry = iterator.next(); WXModule module = entry.getValue(); if(module instanceof Destroyable){ ((Destroyable)module).destroy(); } } }  static boolean registerModule(final String moduleName, final ModuleFactory factory, final boolean global); static void onActivityCreate(String instanceId); static void onActivityStart(String instanceId); static void onActivityPause(String instanceId); static void onActivityResume(String instanceId); static void onActivityStop(String instanceId); static void onActivityDestroy(String instanceId); static boolean onActivityBack(String instanceId); static void onActivityResult(String instanceId,int requestCode, int resultCode, Intent data); static boolean onCreateOptionsMenu(String instanceId,Menu menu); static void onRequestPermissionsResult(String instanceId ,int requestCode, String[] permissions, int[] grantResults); static void destroyInstanceModules(String instanceId); static void createDomModule(WXSDKInstance instance); static void destoryDomModule(String instanceID); static WXDomModule getDomModule(String instanceId); static void reload(); }
WXModuleManager { public static void destroyInstanceModules(String instanceId) { sDomModuleMap.remove(instanceId); HashMap<String, WXModule> moduleMap = sInstanceModuleMap.remove(instanceId); if (moduleMap == null || moduleMap.size() < 1) { return; } Iterator<Entry<String, WXModule>> iterator = moduleMap.entrySet().iterator(); Entry<String, WXModule> entry; while (iterator.hasNext()) { entry = iterator.next(); WXModule module = entry.getValue(); if(module instanceof Destroyable){ ((Destroyable)module).destroy(); } } }  static boolean registerModule(final String moduleName, final ModuleFactory factory, final boolean global); static void onActivityCreate(String instanceId); static void onActivityStart(String instanceId); static void onActivityPause(String instanceId); static void onActivityResume(String instanceId); static void onActivityStop(String instanceId); static void onActivityDestroy(String instanceId); static boolean onActivityBack(String instanceId); static void onActivityResult(String instanceId,int requestCode, int resultCode, Intent data); static boolean onCreateOptionsMenu(String instanceId,Menu menu); static void onRequestPermissionsResult(String instanceId ,int requestCode, String[] permissions, int[] grantResults); static void destroyInstanceModules(String instanceId); static void createDomModule(WXSDKInstance instance); static void destoryDomModule(String instanceID); static WXDomModule getDomModule(String instanceId); static void reload();  }