Skip to content

Instantly share code, notes, and snippets.

@romuald
Created September 13, 2012 11:35
Show Gist options
  • Save romuald/3713731 to your computer and use it in GitHub Desktop.
Save romuald/3713731 to your computer and use it in GitHub Desktop.
PyCountry memory patch
diff --git a/src/pycountry/db.py b/src/pycountry/db.py
index 38689ed..aeb8640 100644
--- a/src/pycountry/db.py
+++ b/src/pycountry/db.py
@@ -45,6 +45,7 @@ class Database(object):
entry.attributes.get(key).value)
entry_obj = self.data_class(entry, **mapped_data)
self.objects.append(entry_obj)
+ tree.unlink()
# Construct list of indices: primary single-column indices
indices = []
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment