Commit 8f6056f6 authored by Arnaud Fontaine's avatar Arnaud Fontaine

WIP: testXHTML memory leak.

parent 2f9c1d13
...@@ -374,6 +374,12 @@ def synchronizeDynamicModules(context, force=False): ...@@ -374,6 +374,12 @@ def synchronizeDynamicModules(context, force=False):
try: try:
for class_name, klass in inspect.getmembers(erp5.portal_type, for class_name, klass in inspect.getmembers(erp5.portal_type,
inspect.isclass): inspect.isclass):
for k in klass.mro():
if k.__module__.startswith('erp5.'):
for attr in ('__implements__', '__implemented__', '__provides__'):
if k.__dict__.get(attr) is not None:
delattr(k, attr)
klass.restoreGhostState() klass.restoreGhostState()
# Clear accessor holders of ZODB Property Sheets and Portal Types # Clear accessor holders of ZODB Property Sheets and Portal Types
...@@ -402,3 +408,8 @@ def synchronizeDynamicModules(context, force=False): ...@@ -402,3 +408,8 @@ def synchronizeDynamicModules(context, force=False):
cache_tool = getattr(portal, 'portal_caches', None) cache_tool = getattr(portal, 'portal_caches', None)
if cache_tool is not None: if cache_tool is not None:
cache_tool.clearCache() cache_tool.clearCache()
import zope.component
gsm = zope.component.getGlobalSiteManager()
gsm.adapters.changed(gsm)
gsm.utilities.changed(gsm)
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment