Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ILocalSiteManager subs attribute keeps subsites referenced after deleting. #1

Closed
agroszer opened this issue Mar 20, 2015 · 1 comment · Fixed by #14
Closed

ILocalSiteManager subs attribute keeps subsites referenced after deleting. #1

agroszer opened this issue Mar 20, 2015 · 1 comment · Fixed by #14
Assignees

Comments

@agroszer
Copy link
Contributor

ILocalSiteManager subs attribute keeps subsites referenced after deleting.
That means you can delete the subsite but the whole will stay in the ZODB because of this attribute.
And that is BAD BAD BAD. Or do I have to "manually" kill that off when removing a subsite?

Copied from
https://bugs.launchpad.net/zope.site/+bug/659162

@mgedmin
Copy link
Member

mgedmin commented Mar 22, 2015

I would expect there to be an event subscriber that removes local site registrations on object deletion events. If that's not the case, one should be added.

@icemac icemac self-assigned this Sep 9, 2020
icemac pushed a commit that referenced this issue Sep 10, 2020
…e manager (#14)

Fixes #1.

The implementation was originally taken from https://github.com/zopefoundation/grokcore.site/blob/fc945c90c5093de8f7ff958cf498eb6305b9c068/src/grokcore/site/subscriber.py#L35-L46 but changed in the review process of this PR.

Co-authored-by: Jason Madden <jamadden@gmail.com>
icemac pushed a commit that referenced this issue Sep 10, 2020
This fixes a reference leak from a parent site manager.
See `issue 1 <https://github.com/zopefoundation/zope.site/issues/1>`.
icemac pushed a commit that referenced this issue Sep 10, 2020
This fixes a reference leak from a parent site manager.
See `issue 1 <https://github.com/zopefoundation/zope.site/issues/1>`.
icemac pushed a commit that referenced this issue Sep 10, 2020
This fixes a reference leak from a parent site manager.
See `issue 1 <https://github.com/zopefoundation/zope.site/issues/1>`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants