>> Thanks, changing several methods to use the 'new..." naming standard did
>> the trick. Using create as suggested by Wade didn't fix the problem, which
>> explains why another method (createBitmapContext) was showing similar
>> behavior.
>
> Create only works with functions (CF convention).
If for some reason you really want to use a naming convention that confuses the
analyzer, you can also use the ns_returns_retained and cf_returns_retained
clang attributes.
For details about these attributes (how to use them in a way that do not
conflict with GCC), have a look at the following
On Feb 2, 2010, at 1:14 PM, Bob Barnes wrote:
> Thanks, changing several methods to use the 'new..." naming standard did
> the trick. Using create as suggested by Wade didn't fix the problem, which
> explains why another method (createBitmapContext) was showing similar
> behavior.
Create o
David,
Thanks, changing several methods to use the 'new..." naming standard did the
trick. Using create as suggested by Wade didn't fix the problem, which explains
why another method (createBitmapContext) was showing similar behavior.
Bob
On Feb 2, 2010, at 12:18 PM, David Duncan wrote:
> - (CGPDFDocumentRef)getPDFDocumentRef:(const char *)filename {
> CGPDFDocumentRefdocument;
>
>snip...
>
> document = CGPDFDocumentCreateWithURL(url);
> return document;
> }
The CF convention is that functions and methods that return a literal reference
t
On Feb 2, 2010, at 11:58 AM, Bob Barnes wrote:
> I've recently upgraded to Mac OS X 10.6.2 in order to run the Analyzer for
> Xcode and it's pointing out some potential memory leaks that really have me
> confused. A typical example is where I have a method that allocates and
> returns somethi
Hi all,
I've recently upgraded to Mac OS X 10.6.2 in order to run the Analyzer for
Xcode and it's pointing out some potential memory leaks that really have me
confused. A typical example is where I have a method that allocates and returns
something like a CGPDFDocumentRef or CGContextRef. Th