Skip to content

Instantly share code, notes, and snippets.

@tobych
Created August 28, 2013 21:55
Show Gist options
  • Save tobych/6371825 to your computer and use it in GitHub Desktop.
Save tobych/6371825 to your computer and use it in GitHub Desktop.
Towards monkey patching my way around https://code.djangoproject.com/ticket/13843
def patched__del__(self):
if self.ptr: lgeos.finishGEOS_r(self.ptr)
import django
django.contrib.gis.geos.prototypes.threadsafe.GEOSContextHandle.__del__ = patched__del__
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment