Proud Member
Proud Member

Reputation: 40496

Must I release this image?

I'm creating an UIImage like this:

UIImage *img = UIGraphicsGetImageFromCurrentImageContext();

Am I responsible for releasing this?

Upvotes: 0

Views: 103

Answers (2)

Yuji
Yuji

Reputation: 34185

Read the documentation here. As it's written there, it returns an autoreleased object. You don't have to release it. If you want to keep it, you need to retain it somehow.

Upvotes: 1

Ben Zotto
Ben Zotto

Reputation: 71008

No.

Return Value

An autoreleased image object containing the contents of the current bitmap graphics context.

(doc link)

Upvotes: 3

Related Questions