Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6235773
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 24, 20262026-05-24T10:43:42+00:00 2026-05-24T10:43:42+00:00

Is there an autorelease analogous method for CGPDFDocumentRef instances? I’d like to apply this

  • 0

Is there an autorelease analogous method for CGPDFDocumentRef instances? I’d like to apply this before returning an instance I created. Or can I only do CGPDFDocumentRelease(...) before returning (which is surely wrong)?

Since I created the CGPDFDocumentRef I’d like to take care with its release.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-24T10:43:43+00:00Added an answer on May 24, 2026 at 10:43 am

    The best thing you can do is to write an Obj-C wrapper around CGPDFDocumentRef and release the CGPDFDocumentRef on your wrapper’s dealloc method so the rest of your code will retain/release your wrapper as with ay other NSObject derivate and once the wrapper’s retain count reaches zero the CGPDFDocumentRef will be released on the wrapper’s dealloc method and consequently freed from memory as it’s retain count never got past 1.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

It seems like there is memory leak in this piece of code.I am using
I know there's another question like this on stack overflow, but my problem is
I Create a class named DataClass there i have this method +(NSMutableArray*) returnList :(NSString
Is there a good reason why I should not do something like this? Example:
There is previous little on the google on this subject other than people asking
There are a few ways to get class-like behavior in javascript, the most common
There are posts similar to mine, but I have not found one exactly like
I know there are a lot of questions on this topic already, but it
I created a list of Youtube videos but there are some problems: - (UITableViewCell
I'm not sure how this works. For nav ctlrs, do I just alloc/init/ autorelease

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.