Author: chromatic
Date: Tue Jun  5 23:49:10 2007
New Revision: 18839

Modified:
   trunk/src/objects.c

Log:
[Objects] Fixed another memory leak by freeing method cache entries.

Modified: trunk/src/objects.c
==============================================================================
--- trunk/src/objects.c (original)
+++ trunk/src/objects.c Tue Jun  5 23:49:10 2007
@@ -26,6 +26,8 @@
 static void parrot_class_register(Interp *interp, PMC *name,
         PMC *new_class, PMC *parent, PMC *mro);
 
+static void invalidate_type_caches(Interp *interp, UINTVAL type);
+
 /*
 
 FUNCDOC:
@@ -1180,9 +1182,10 @@
     UINTVAL i;
     Caches * const mc = interp->caches;
 
+    /* mc->idx[type][bits] = e; */
     for (i = 0; i < mc->mc_size; i++) {
         if (mc->idx[i])
-            mem_sys_free(mc->idx[i]);
+            invalidate_type_caches(interp, i);
     }
 
     mem_sys_free(mc->idx);

Reply via email to