[Geany-Devel] On document pointer recycling - doc->is_valid

Lex Trotman elextr at xxxxx
Fri Oct 25 23:22:55 UTC 2013

On 26 October 2013 00:01, Nick Treleaven <nick.treleaven at 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
> Devel at lists.geany.org
> https://lists.geany.org/cgi-**bin/mailman/listinfo/devel<https://lists.geany.org/cgi-bin/mailman/listinfo/devel>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.geany.org/pipermail/devel/attachments/20131026/6d084b85/attachment.html>

More information about the Devel mailing list