ghiboz
ghiboz

Reputation: 8003

ios potential leak how to solve?

I've analyzed my project: and this is the result: enter image description here

what means and how can I solve this?

Upvotes: 0

Views: 619

Answers (2)

Aidan Steele
Aidan Steele

Reputation: 11330

It looks like you might want to familiarise yourself with the Memory Management Programming Guide for Core Foundation, specifically the ownership policy.

In short, you have to CFRelease() the pdfURL object. :-)

Upvotes: 4

Mark Adams
Mark Adams

Reputation: 30846

You should release pdfURL after you have used it to create pdf.

Try...

CGPDFDocumentRef pdf = CGPDFDocumentCreateWithURL(pdfURL);
CFRelease(pdfURL);

Upvotes: 6

Related Questions