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

Use weakrefs to avoid leaks #20

Merged
merged 1 commit into from
Mar 20, 2012
Merged

Conversation

patricklucas
Copy link
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
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 Yelp:master Mar 20, 2012
# for free to subscribe to this conversation on GitHub. Already have an account? #.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Memory leak in V2.0.2
2 participants