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

  • Home
  • SEARCH
  • 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 9002821
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T00:37:19+00:00 2026-06-16T00:37:19+00:00

I am trying to read the ARGB pixels from a an image asset in

  • 0

I am trying to read the ARGB pixels from a an image asset in iOS. For that, I need a CGImageRef I can use to get its CGDataProvider. My question is, if I create a CGImageRef using:

CGImageRef cg = [[UIImage imageNamed: Path] CGImage];

Will I eventually need to call CGImageRelease(cg)? If I don’t call CGImageRelease, will I have a memory leak?

Another issue I am having is that reading the same file for a second time returns an empty image, which I suspect might be because I didn’t call CGImageRelease the first time.

  • 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-06-16T00:37:20+00:00Added an answer on June 16, 2026 at 12:37 am

    You have to call CGImageRelease only when you use CGImageCreate, Copy or Retain(Or any such related method with create, copy, retain. For eg:- CGBitmapContextCreateImage). In this case, you dont have to do that since you are not doing any create, copy or retain.

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

Sidebar

Related Questions

I am trying to read the ARGB pixel data from a png image asset
I trying to read a value from an ArrayCollection, I use getItemAt and get
I am trying to read an image from /mnt/sdcard/img.jpg into ImageView. Bitmap bm =
I am trying to read in a scanned image and compress it from a
Hey trying to read stream into image control can any one help also I
Im trying to read in image file from a server , with the code
I'm trying to read Hebrew values from a .properties file and I get gibberish.
Trying to read double data from the file that has different contents. For example
When trying to read data from mdb using backgroundworker I get an error The
I'm trying read an array that was post from a html form <input name=test[]

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.