了解分析我的申请的结果

发布于 2024-09-11 22:32:48 字数 823 浏览 2 评论 0原文

我有一些内存问题,从另一篇文章我试图分析我的项目以了解我的错误....这里有一些我不明白我的错误在哪里....

谢谢

1:sqlite 连接: sqlite连接http://grab.by/grabs/2125d36a8ec1fb0af1c813af33af5653.png

2:json转换器: json转换器http://grab.by/grabs/7b22080098c8931d7ef505a1eb7c087e.png

3:url连接: url连接http://grab.by/grabs/848a0942f69c91303347d08c64fb2fbb.png

4:uitableview的cell : uitableview 的单元格 http://grab.by/grabs/3917e88829bb6c956bb30445fc7bec20.png

I have some memory problems, from another post I tried to analyze my project to understand my errors.... here are some things that I don't understand where's my error....

thanks

1: sqlite connection:
sqlite connection http://grab.by/grabs/2125d36a8ec1fb0af1c813af33af5653.png

2: json converter:
json converter http://grab.by/grabs/7b22080098c8931d7ef505a1eb7c087e.png

3: url connection:
url connection http://grab.by/grabs/848a0942f69c91303347d08c64fb2fbb.png

4: cell of uitableview:
cell of uitableview http://grab.by/grabs/3917e88829bb6c956bb30445fc7bec20.png

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(2

梦旅人picnic 2024-09-18 22:32:48
  1. 如前所述,您将分配给 dbrc 而不使用它。如果您不打算使用错误代码,则可以省略该分配。

    sqlite3_prepare_v2(...);
    ...
    while (sqlite3_step(...) == SQLITE_ROW) {
      ...
    
  2. 如果上面的for循环没有运行(即正则表达式无法匹配),那么matchOk将永远不会被初始化,即它包含垃圾。

    NSString* matchOK = nil;
    整数 nM = 0;
    ...
    
  3. 您已经+alloc分配了一个NSURLConnection,但从未将结果存储在任何地方,因此对于分析器来说,之后没有机会-release它。这会导致泄漏。

  4. 您已经 +alloced 了一个 TickerSessions,但没有 -releaseing。

实际上,您可以打开“构建结果”窗口来查看触发错误的原因。

http://developer.apple.com/ iphone/library/documentation/DeveloperTools/Conceptual/XcodeProjectManagement/art/analyzer_results_by_step.jpg

  1. As stated you're assigning to dbrc without using it. You could just leave out the assignment if you're not going to use the error code.

    sqlite3_prepare_v2(...);
    ...
    while (sqlite3_step(...) == SQLITE_ROW) {
      ...
    
  2. If the for loop above is not run (i.e. the regex fails to match), then matchOk will never be initialized, i.e. it contains garbage.

    NSString* matchOK = nil;
    int nM = 0;
    ...
    
  3. You have +alloced a NSURLConnection but never store the result anywhere, thus to the analyzer there is no chance -releaseing it afterwards. This causes a leak.

  4. You have +alloced a TickerSessions without -releaseing it.

Actually you could open the Build Results window to see what triggers the error.

http://developer.apple.com/iphone/library/documentation/DeveloperTools/Conceptual/XcodeProjectManagement/art/analyzer_results_by_step.jpg

往日情怀 2024-09-18 22:32:48
  1. 您正在向 dbrc 分配值,但您从未使用分配的值。只需摆脱该变量即可。

  2. 如果正则表达式不匹配或只有一个匹配项,则 matchOk 的值不确定,因为赋值永远不会被执行。因此,dataUsingEncoding消息的接收者是垃圾。

  3. ReadType 是在赋值期间自动分配的类型,很可能是 NSNumber。你永远不会释放那个对象。

  4. 您正在显式分配刻度值,但在退出方法作用域之前并未释放它。

  1. You are assigning values to dbrc, but you are never using the assigned value. just get rid of that variable.

  2. If the regular expression does not match or there's only one match, matchOk has an undetermined value, since the assignment will never be executed. Hence, the receiver for dataUsingEncoding message is garbage.

  3. ReadType is of type that does automatic allocation during the assignment, most probably an NSNumber. You are never releasing that object.

  4. You are explicitly allocating the tick value, but you are not releasing it before exiting the method scope.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文