On Tuesday 25 September 2007 15:05:21 Bram Geron wrote: > Reasoning from this model, I can't see what from_ctx is for. After > solving one exception, there is no place that uses the value of > from_ctx. So if a piece of code uses that context, it's stored at > another place and that place should refcount itself, not delegate that > to Parrot_cont->from_ctx.
> Still, there may be a place that I overlooked and that increases but > never decreases the refcount. Then the context should be automatically > handled by the mark-and-sweep gc after the patch, so no memory leak > should arise. > On a side note, Continuation->mark doesn't seem to collect the from_ctx. > This means that if some context was kept live only with from_ctx, it > would be marked dead on the next gc run. And since that didn't produce > bugs, we can also assume that from_ctx is redundant. Nit: while Continuation PMCs are part of GC, the context structures, sadly, aren't. Thus they currently can leak for more reasons than an overzealous mark(). -- c