Hi,
The following PMC leaks memory at about 55Mb/1000000 calls to `call()'
#include "parrot/parrot.h"
static INTVAL dynpmc_Foo;
pmclass Foo dynpmc {
void class_init() {
if (pass) {
dynpmc_Foo = Parrot_PMC_typenum(INTERP, "Foo");
}
}
void assign_pmc(PMC *sub) {
PMC_pmc_val(SELF) = sub;
}
PCCMETHOD void call() {
PMC *sub = PMC_pmc_val(SELF);
Parrot_runops_fromc(INTERP, sub);
}
}
Cheers,
Rich