开发者

memory leak in uimapkit polyline

I'm practicing drawing polyline on the Map. I've adopted Sample code from download here.

Here is the part that I开发者_如何学JAVA 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.


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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜