[cfe-commits] r94090 - in /cfe/trunk: include/clang/AST/Type.h lib/AST/ASTContext.cpp lib/AST/Type.cpp

Ted Kremenek kremenek at apple.com
Thu Jan 21 15:29:03 PST 2010


Yes would could do that.  It would save a pointer.

On Jan 21, 2010, at 12:45 PM, Douglas Gregor wrote:

> 
> On Jan 21, 2010, at 11:22 AM, Ted Kremenek wrote:
> 
>> Author: kremenek
>> Date: Thu Jan 21 13:22:34 2010
>> New Revision: 94090
>> 
>> URL: http://llvm.org/viewvc/llvm-project?rev=94090&view=rev
>> Log:
>> Allocate the 'Protocols' array in ObjCInterfaceType and
>> ObjCObjectPointerType using the allocator associated with ASTContext.
>> Not only does this fix a memory leak, but it also makes these arrays
>> BumpPtrAllocated (in the typical case).
> 
> Why not allocate space for the protocols after the ObjCInterfaceType storage, rather than having
> 
>> +  ObjCProtocolDecl **Protocols;
> 
> ?
> 
> 	- Doug





More information about the cfe-commits mailing list