【发布时间】:2012-03-13 08:06:39
【问题描述】:
- (void) rgbMatrix:(UIImage *)i toRGB:(uint32_t **)rgbArray{
int m_width = i.size.width;
int m_height = i.size.height;
*rgbArray = (uint32_t *) malloc(m_width * m_height * sizeof(uint32_t));
}
uint32_t *rgbArray = NULL;
[self rgbMatrix:image toRGB:&rgbArray];
有人可以帮忙吗?这不起作用。在objective-c中使用malloc的方式不支持吗?
【问题讨论】:
-
你的代码一切正常,你的意思是 ot 不起作用? Objective-C 确实支持 malloc。
标签: objective-c ios pointers malloc