Mercurial > dwindows
comparison ios/dw.m @ 2737:74b69da35e91
iOS: Fix a pixmap memory leak, CGImage needs to be released after using it
to create a UIImage.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 17 Dec 2021 00:39:33 +0000 |
parents | f9df10c66353 |
children | c2387166a414 |
comparison
equal
deleted
inserted
replaced
2736:09775418c776 | 2737:74b69da35e91 |
---|---|
1887 image = [UIImage imageWithCGImage:cgimage]; | 1887 image = [UIImage imageWithCGImage:cgimage]; |
1888 CGContextRelease(cgcontext); | 1888 CGContextRelease(cgcontext); |
1889 cgcontext = nil; | 1889 cgcontext = nil; |
1890 [image retain]; | 1890 [image retain]; |
1891 [oldimage release]; | 1891 [oldimage release]; |
1892 CGImageRelease(cgimage); | |
1892 } | 1893 } |
1893 return image; | 1894 return image; |
1894 } | 1895 } |
1895 -(CGContextRef)cgcontext | 1896 -(CGContextRef)cgcontext |
1896 { | 1897 { |