On Tue, Oct 09, 2012 at 08:58:43AM -0400, Stephen Gallagher wrote:
>I discussed the hierarchy some more with Pavel and the proposal
is to
>modify the hierarchy as follows:
>
> main_ctx --> rctx +--> dp_requests
> |
> +--> specific_ctx
>
>And then set a desctructor to dp_requests so that it is freed before
>specific_ctx is as destructors of the DP requests might need to access
>data from the specific_ctx.
>
That's an overly complex solution. What's wrong with doing
main_ctx->rctx->specific_ctx->dp_requests? Yes, I realize that
dp_requests is a component of the rctx struct, but as long as we add
comments that its memory hierarchy is maintained as a child of the
specific_ctx, I think we'd be fine.
That's exactly what I proposed to Pavel as well, but he felt it would
break the talloc hierarchy.