[svn:parrot] r38258 - trunk/src

cotto at svn.parrot.org cotto at svn.parrot.org
Tue Apr 21 22:17:30 UTC 2009


Author: cotto
Date: Tue Apr 21 22:17:29 2009
New Revision: 38258
URL: https://trac.parrot.org/parrot/changeset/38258

Log:
[PMC] call a PMC's destroy VTABLE function before reusing it

Modified:
   trunk/src/pmc.c

Modified: trunk/src/pmc.c
==============================================================================
--- trunk/src/pmc.c	Tue Apr 21 21:59:04 2009	(r38257)
+++ trunk/src/pmc.c	Tue Apr 21 22:17:29 2009	(r38258)
@@ -188,6 +188,10 @@
     /* Do we have an extension area? */
     has_ext = (PObj_is_PMC_EXT_TEST(pmc) && pmc->pmc_ext);
 
+    /* Does the old PMC need any resources freed? */
+    if (PObj_active_destroy_TEST(pmc))
+        VTABLE_destroy(interp, pmc);
+
     /* Do we need one? */
     if (new_vtable->flags & VTABLE_PMC_NEEDS_EXT) {
         /* If we need an ext area, go allocate one */


More information about the parrot-commits mailing list