一定出事了這個代碼就在這裏:我在這裏有內存管理問題嗎?
+ (UIImage*)captureView:(UIView *)theView {
UIGraphicsBeginImageContext(theView.frame.size);
[theView.layer renderInContext:UIGraphicsGetCurrentContext()];
UIImage *newImage = UIGraphicsGetImageFromCurrentImageContext();
UIGraphicsEndImageContext();
return newImage;
}
當我使用,Xcode中拋出我這個錯誤消息:
的malloc:*爲對象 0x103f000錯誤:指針被釋放沒有 分配 *設置malloc_error_break斷點調試
我在那裏看不到任何內存管理錯誤。還有其他人嗎?
你是否像它告訴你一樣在'malloc_error_break'上設置了斷點?如果是這樣,那麼調用堆棧是什麼? – 2010-03-13 08:20:01