diff --git a/news/187.bug b/news/187.bug new file mode 100644 index 0000000..0fe8b1f --- /dev/null +++ b/news/187.bug @@ -0,0 +1 @@ +Fix a memory leak as reported in https://github.com/plone/Products.CMFPlone/issues/3829, changing interface declaration type as suggested by @d-maurer in https://github.com/plone/plone.dexterity/issues/186 [mamico] diff --git a/plone/dexterity/content.py b/plone/dexterity/content.py index 18e0faa..593b70c 100644 --- a/plone/dexterity/content.py +++ b/plone/dexterity/content.py @@ -42,8 +42,8 @@ from zope.interface import implementer from zope.interface.declarations import getObjectSpecification from zope.interface.declarations import implementedBy -from zope.interface.declarations import Implements from zope.interface.declarations import ObjectSpecificationDescriptor +from zope.interface.declarations import Provides from zope.interface.interface import Method from zope.schema.interfaces import IContextAwareDefaultFactory from zope.security.interfaces import IPermission @@ -193,7 +193,7 @@ def __get__(self, inst, cls=None): return spec dynamically_provided.append(spec) - all_spec = Implements(*dynamically_provided) + all_spec = Provides(cls, *dynamically_provided) inst._v__providedBy__ = updated + (all_spec,) return all_spec