[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: memory management
>Darn, I have one right into my face (the list of window in my prototype
>library is a circular list in Z-order with the parent pointing at the
>one on top)... This is one of the case where pure refcounting easily
>comes apart, and believe me, it occurs more often than I'd like it to!
Well, not to be disrespectful or anything, but either your code or your
constraints are broken... unless you really do have windows which bend in the Z
direction. A window which is on top of another cannot also be under it if they
are flat in Z. There is a root window, which has no window under it pointing at
it and there is a top-most window which cannot point to anything since nothing
is obscuring it. The data structure isn't modelling the problem.