| 205 | } |
| 206 | |
| 207 | static bool isPointerReleased(const Token *startToken, const Token *endToken, nonneg int varid) |
| 208 | { |
| 209 | for (const Token *tok = startToken; tok && tok != endToken; tok = tok->next()) { |
| 210 | if (tok->varId() != varid) |
| 211 | continue; |
| 212 | if (Token::Match(tok, "%var% . release ( )")) |
| 213 | return true; |
| 214 | if (Token::Match(tok, "%var% =")) |
| 215 | return false; |
| 216 | } |
| 217 | return false; |
| 218 | } |
| 219 | |
| 220 | static bool isLocalVarNoAutoDealloc(const Token *varTok) |
| 221 | { |