Understanding the results of analyzing my application
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 err开发者_运维知识库or....
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
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) { ...
If the
for
loop above is not run (i.e. the regex fails to match), thenmatchOk
will never be initialized, i.e. it contains garbage.NSString* matchOK = nil; int nM = 0; ...
You have
+alloc
ed a NSURLConnection but never store the result anywhere, thus to the analyzer there is no chance-release
ing it afterwards. This causes a leak.You have
+alloc
ed a TickerSessions without-release
ing 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
You are assigning values to dbrc, but you are never using the assigned value. just get rid of that variable.
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.
ReadType is of type that does automatic allocation during the assignment, most probably an NSNumber. You are never releasing that object.
You are explicitly allocating the tick value, but you are not releasing it before exiting the method scope.
精彩评论