Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>You can wrap the calls in an <code>NSAutoreleasePool</code>, where their results will be pooled. Then you can call [pool drain] on that pool and its contents will be released, including the images.</p> <p>Note however that you will not be able to use the images outside of the NSAutoreleasePool's scope, so you code might want to look something like:</p> <pre><code>NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; UIImage * scaledImage = [blurMe _imageScaledToSize:CGSizeMake(blurMe.size.width / dblBlurLevel, blurMe.size.width / dblBlurLevel) interpolationQuality:3.0]; UIImage * labelImage = [scaledImage _imageScaledToSize:blurMe.size interpolationQuality:3.0]; UIImage * imageCopy = [[UIImage alloc] initWithCGImage:labelImage.CGImage]; // Gives a non-autoreleased copy of labelImage [pool drain]; // deallocates scaledImage and labelImage imgView.image = imageCopy; // retains imageCopy </code></pre> <p><strong>UPDATE:</strong></p> <p>If the above is still giving you problems, please see the solution I posted to <a href="https://stackoverflow.com/questions/1315251/how-to-rotate-a-uiimage-90-degrees/1317194#1317194">this question</a>. The question involves rotating an image 90 degrees instead of scaling it, but the premise is the same (it's just the matrix transformation that is different). Using code like in the answer I posted should give you greater control over your memory management and steer you away from using undocumented APIs like <code>_imageScaledToSize</code>.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload