Committed revision 161698.  Thanks, Dmitri.

 Chad

On Aug 10, 2012, at 12:52 PM, Dmitri Gribenko wrote:

> On Fri, Aug 10, 2012 at 12:13 PM, Chad Rosier <[email protected]> wrote:
>> +  Clobbers = new (C) std::string[NumClobbers];
> 
> std::string is calling plain new[] internally to allocate memory for
> characters.  Since destructors will not be called (because std::string
> itself is allocated on ASTContext's allocator), this is a memory leak.
> 
> You might want to use ArrayRef<StringRef> where memory for baking
> array and strings is allocated on ASTContext's allocator.
> 
> Dmitri
> 
> -- 
> main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
> (j){printf("%d\n",i);}}} /*Dmitri Gribenko <[email protected]>*/

_______________________________________________
cfe-commits mailing list
[email protected]
http://lists.cs.uiuc.edu/mailman/listinfo/cfe-commits

Reply via email to