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

Douglas Gregor dgregor at apple.com
Thu Jan 21 12:45:24 PST 2010


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