Skip to content

break reference loop using weakref to prevent memory-leaking #98

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

Merged
merged 2 commits into from
Dec 29, 2014

Conversation

chaoslawful
Copy link
Contributor

This patch should fix memory-leaking issue #57

@julien-duponchelle
Copy link
Owner

It sound a good idea

But in test we got a lot of:

ReferenceError: weakly-referenced object no longer exists

2014-10-23 11:31 GMT+02:00 Wang, Xiaozhe [email protected]:

This patch should fix memory-leaking issue
#57

#57

You can merge this Pull Request by running

git pull https://github.com/chaoslawful/python-mysql-replication master

Or view, comment on, or merge it at:

#98
Commit Summary

  • break reference loop using weakref to prevent memory-leaking

File Changes

Patch Links:

Reply to this email directly or view it on GitHub
#98.

@chaoslawful
Copy link
Contributor Author

Hmmm...I got this problem in one of our testing box too. But what confused me is that the problem didn't appear on other testing boxes with exactly the same environment. My best guess is that it related with some internal issues in python's weakref module.

Anyway, we can always explicitly break reference cycle in BinLogStreamReader's close method. I just committed the changes.

@julien-duponchelle
Copy link
Owner

Great thanks for the patch

julien-duponchelle added a commit that referenced this pull request Dec 29, 2014
break reference loop using weakref to prevent memory-leaking
@julien-duponchelle julien-duponchelle merged commit b926ac4 into julien-duponchelle:master Dec 29, 2014
@julien-duponchelle julien-duponchelle mentioned this pull request Jul 28, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants