Nikolai Weibull
3/9/2005 9:09:00 PM
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
--
::: name: Nikolai Weibull :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA :: loc atm: Gothenburg, Sweden :::
::: page: www.pcppopper.org :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}