[svn:parrot] r39075 - trunk/src/pmc

chromatic at svn.parrot.org chromatic at svn.parrot.org
Sat May 23 10:30:17 UTC 2009


Author: chromatic
Date: Sat May 23 10:30:16 2009
New Revision: 39075
URL: https://trac.parrot.org/parrot/changeset/39075

Log:
[PMC] Removed a memory leak in UnManagedStruct PMC.

Modified:
   trunk/src/pmc/unmanagedstruct.pmc

Modified: trunk/src/pmc/unmanagedstruct.pmc
==============================================================================
--- trunk/src/pmc/unmanagedstruct.pmc	Sat May 23 03:25:04 2009	(r39074)
+++ trunk/src/pmc/unmanagedstruct.pmc	Sat May 23 10:30:16 2009	(r39075)
@@ -676,10 +676,26 @@
         Parrot_UnManagedStruct_attributes *attrs =
             mem_allocate_zeroed_typed(Parrot_UnManagedStruct_attributes);
         PMC_data(SELF) = attrs;
+        PObj_active_destroy_SET(SELF);
     }
 
 /*
 
+=item C<void destroy()>
+
+Destroys the subroutine.
+
+=cut
+
+*/
+
+    VTABLE void destroy() {
+        mem_sys_free(PMC_data(SELF));
+    }
+
+
+/*
+
 =item C<void init_pmc(PMC *value)>
 
 Initialize the struct with some data.


More information about the parrot-commits mailing list