N
Nikolai Weibull
In re.c(make_regexp):
rp = ALLOC(Regexp);
MEMZERO((char *)rp, Regexp, 1);
rp->buffer = ALLOC_N(char, 16);
rp->allocated = 16;
rp->fastmap = ALLOC_N(char, 256);
if (flags) {
rp->options = flags;
}
err = re_compile_pattern(s, len, rp);
if (err != NULL) {
rb_reg_raise(s, len, err, 0);
}
return rp;
As rb_raise is implemented with longjmp, won't this leed to
memory-leaks? I have code that works similar to this, so I'd really
like to know, so that I can clean up before I call rb_raise if
necessary,
nikolai
rp = ALLOC(Regexp);
MEMZERO((char *)rp, Regexp, 1);
rp->buffer = ALLOC_N(char, 16);
rp->allocated = 16;
rp->fastmap = ALLOC_N(char, 256);
if (flags) {
rp->options = flags;
}
err = re_compile_pattern(s, len, rp);
if (err != NULL) {
rb_reg_raise(s, len, err, 0);
}
return rp;
As rb_raise is implemented with longjmp, won't this leed to
memory-leaks? I have code that works similar to this, so I'd really
like to know, so that I can clean up before I call rb_raise if
necessary,
nikolai