Re: [CFReview] Red-Black Tree
От | Robert Haas |
---|---|
Тема | Re: [CFReview] Red-Black Tree |
Дата | |
Msg-id | 603c8f071002081935m490bc392g9eefff50054d8015@mail.gmail.com обсуждение исходный текст |
Ответ на | Re: [CFReview] Red-Black Tree (Alvaro Herrera <alvherre@commandprompt.com>) |
Ответы |
Re: [CFReview] Red-Black Tree
Re: [CFReview] Red-Black Tree |
Список | pgsql-hackers |
On Mon, Feb 8, 2010 at 3:05 PM, Alvaro Herrera <alvherre@commandprompt.com> wrote: > It seems a bit strange to have all the rb_free_recursive support and not > use it anywhere ... and a freefunc callback even, whose only caller > seems to set as null currently. Hmm, even in the knngist patch the > rb_freefunc stuff is unused. I don't think it's inappropriate; it doesn't seem implausible that someone might want to free an rbtree someday. I suppose we could comment it out but I guess I don't see the point. > How do we now that it works? Visual inspection? It's not very complicated. > (What, for example, if we were to allocate multiple nodes in a single > palloc chunk? I'm not familiar with this stuff but that seems > plausible) Well, then you could have the freefunc do something ((MyStruct *) a)->is_allocated = false. ...Robert
В списке pgsql-hackers по дате отправления: