changeset 128:1e4d4d475e75

Fixed GC issues w/ context dealloc.
author Atul Varma <varmaa@toolness.com>
date Sun, 23 Aug 2009 17:39:28 -0700
parents 4179d1e1a75c
children 7b7a23615873
files src/context.cpp
diffstat 1 files changed, 3 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/context.cpp	Sun Aug 23 17:21:02 2009 -0700
+++ b/src/context.cpp	Sun Aug 23 17:39:28 2009 -0700
@@ -105,13 +105,15 @@
 {
   if (self->weakrefs)
     PyObject_ClearWeakRefs((PyObject *) self);
+  PyObject_GC_UnTrack(self);
+
   if (self->cx) {
     JS_DestroyContext(self->cx);
     self->cx = NULL;
   }
 
   PYM_clear(self);
-  self->ob_type->tp_free((PyObject *) self);
+  PyObject_GC_Del(self);
 }
 
 static PyObject *