<div dir="ltr"><br><div class="gmail_extra"><br><br><div class="gmail_quote">On Wed, Nov 13, 2013 at 9:05 PM, Dmitri Gribenko <span dir="ltr"><<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div class="im">On Wed, Nov 13, 2013 at 6:01 PM, Sean Silva <<a href="mailto:silvas@purdue.edu">silvas@purdue.edu</a>> wrote:<br>

><br>
> On Wed, Nov 13, 2013 at 8:25 PM, Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>><br>
> wrote:<br>
>><br>
>> On Wed, Nov 13, 2013 at 5:22 PM, Sean Silva <<a href="mailto:silvas@purdue.edu">silvas@purdue.edu</a>> wrote:<br>
>> ><br>
>> > On Wed, Nov 13, 2013 at 8:08 PM, Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>><br>
>> > wrote:<br>
>> >> Or we could only return the first paragraph.  Faking a paragraph<br>
>> >> requires creating AST nodes, which requires memory allocation on the<br>
>> >> ASTContext, which is permanent.<br>
>> ><br>
>> > Why not create it on demand in "freeable" storage?<br>
>><br>
>> There is no API to free a CXComment node, because it is supposed to<br>
>> represent an real AST node, which is allocated on ASTContext.<br>
><br>
><br>
> Can't you allocate it on the CXTranslationUnit (or whatever the relevant<br>
> nearby "context" object is that is explicitly created/destroyed)?<br>
<br>
</div>There is no difference, because the lifetime of these contexts is the same.<br></blockquote><div><br></div><div>Wait then what's the big deal with just allocating them permanently? It's not like these comments are going to be gigabytes in size.</div>
<div><br></div><div>-- Sean Silva</div><div> </div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div class="HOEnZb"><div class="h5"><br>
Dmitri<br>
<br>
--<br>
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if<br>
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com">gribozavr@gmail.com</a>>*/<br>
</div></div></blockquote></div><br></div></div>