Skip to content
This repository was archived by the owner on Apr 18, 2018. It is now read-only.

Use weakrefs to avoid leaks#20

Merged
eskil merged 1 commit intoYelpArchive:masterfrom
patricklucas:fix_mem_leak
Mar 20, 2012
Merged

Use weakrefs to avoid leaks#20
eskil merged 1 commit intoYelpArchive:masterfrom
patricklucas:fix_mem_leak

Conversation

@patricklucas
Copy link
Copy Markdown
Contributor

Dictionaries in client and client_handler keep references to GearmanJobRequest objects, but aren't explicitly removed until they either fail or complete.

This never occurs when wait_until_complete=False, so using WeakKeyDictionary and WeakValueDictionary ensures the request objects can be garbage collected.

Closes #10

Dictionaries in client and client_handler keep references to
GearmanJobRequest objects, but aren't explicitly removed until they
either fail or complete.

This never occurs when wait_until_complete=False, so using
WeakKeyDictionary and WeakValueDictionary ensures the request objects
can be garbage collected.
@eskil
Copy link
Copy Markdown
Contributor

eskil commented Mar 20, 2012

Elegant. Looks good.

eskil added a commit that referenced this pull request Mar 20, 2012
@eskil eskil merged commit c8fafa3 into YelpArchive:master Mar 20, 2012
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Memory leak in V2.0.2

2 participants