[svn:parrot] r46216 - trunk/src/pmc
NotFound at svn.parrot.org
NotFound at svn.parrot.org
Sun May 2 14:20:26 UTC 2010
Author: NotFound
Date: Sun May 2 14:20:26 2010
New Revision: 46216
URL: https://trac.parrot.org/parrot/changeset/46216
Log:
register OPLIB_OPCODE_CACHE to avoid being collected while the singleton is still alive
Modified:
trunk/src/pmc/oplib.pmc
Modified: trunk/src/pmc/oplib.pmc
==============================================================================
--- trunk/src/pmc/oplib.pmc Sun May 2 14:04:16 2010 (r46215)
+++ trunk/src/pmc/oplib.pmc Sun May 2 14:20:26 2010 (r46216)
@@ -41,8 +41,10 @@
}
VTABLE void init() {
- if (OPLIB_OPCODE_CACHE == NULL)
+ if (OPLIB_OPCODE_CACHE == NULL) {
OPLIB_OPCODE_CACHE = Parrot_pmc_new(INTERP, enum_class_Hash);
+ Parrot_pmc_gc_register(INTERP, OPLIB_OPCODE_CACHE);
+ }
PObj_custom_mark_SET(SELF);
}
More information about the parrot-commits
mailing list