uimapkit 折线内存泄漏
我正在练习在地图上绘制折线。 我采用了在此处下载的示例代码。
此处是我在构建时收到内存警告的部分->分析
MKMapRect routeRect = MKMapRectMake(southWestPoint.x, southWestPoint.y, northEastPoint.x - southWestPoint.x, northEastPoint.y - southWestPoint.y);
// clear the memory allocated earlier for the points
free(pointArr);
调试器窗口提示错误
The left operand of '-' is a garbage value
嗯,我不明白。 为什么会出现这样的情况呢?
这是严重错误吗?
如何修复它?
谢谢。
I'm practicing drawing polyline on the Map.
I've adopted Sample code from download here.
Here is the part that I got memory warning when I do build->Analysis
MKMapRect routeRect = MKMapRectMake(southWestPoint.x, southWestPoint.y, northEastPoint.x - southWestPoint.x, northEastPoint.y - southWestPoint.y);
// clear the memory allocated earlier for the points
free(pointArr);
Debugger Window prompt error
The left operand of '-' is a garbage value
Uhm I don't get it.
Why is this happened?
Is this Critical Error?
How to fix it?
Thank you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
变量
northEastPoint
显然尚未初始化为任何内容。这意味着您的计算几乎肯定不会返回您希望的任何值。您可以通过将所有变量初始化为有意义的状态来修复它。The variable
northEastPoint
has apparently not been initialized to anything. This means that your calculation will almost certainly not return whatever value you were hoping for. You fix it by initializing all your variables to a meaningful state.