On 26 October 2013 00:01, Nick Treleaven <nick.treleaven@btinternet.com> wrote:
On 24/10/2013 10:24, Lex Trotman wrote:
Okay, but you still agree that doc->is_valid should be removed eventually?
>That's a step forward:)

Of course I agree.  So its not a terribly big step:)

I only skimmed the discussion, but how can we remove that?

Given your experience it would be good if you could read the discussion and give your perspective on what the previous posters have discussed regarding handling doc pointers properly.

I think freeing document memory has high potential to break things. There are a few places where Geany assumes document memory isn't freed over time.

As above.  And also given your history with Geany is longer than anyone in the discussion, perhaps you can point out any benefits that may have been missed in the previous posts that override the problems of the design.


If people don't like foreach_document (or Matt's improved C99 foreach_doc with document pointers), we could add document_get_all or something that returned a list of valid pointers. That can be done without breaking existing code. Personally I prefer Matt's suggested macro because you don't have to free the list.
Devel mailing list