<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On 26 October 2013 00:01, Nick Treleaven <span dir="ltr"><<a href="mailto:nick.treleaven@btinternet.com" target="_blank">nick.treleaven@btinternet.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">On 24/10/2013 10:24, Lex Trotman wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Okay, but you still agree that doc->is_valid should be removed eventually?<br>
>That's a step forward:)<br>
</blockquote>
<br>
Of course I agree.  So its not a terribly big step:)<br>
</blockquote>
<br>
I only skimmed the discussion, but how can we remove that?<br></blockquote><div><br></div><div>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.</div>
<div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
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.<br></blockquote><div><br></div><div>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.</div>
<div><br></div><div>Cheers</div><div>Lex</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<br>
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.<br>

______________________________<u></u>_________________<br>
Devel mailing list<br>
<a href="mailto:Devel@lists.geany.org" target="_blank">Devel@lists.geany.org</a><br>
<a href="https://lists.geany.org/cgi-bin/mailman/listinfo/devel" target="_blank">https://lists.geany.org/cgi-<u></u>bin/mailman/listinfo/devel</a><br>
</blockquote></div><br></div></div>