OK to retain ASIHTTPRequest delegate?

前端 未结 3 1384
广开言路
广开言路 2021-01-28 17:35

Is it OK to retain a delegate of a subclass of ASIHTTPRequest?

I made a subclass of ASIHTTPRequest called JSONRequest. Each instan

3条回答
  •  死守一世寂寞
    2021-01-28 18:06

    If your release is deterministic (if you promise it will always happen, even in the case of an error, a timeout, or some other sort of unexpected event - like the connection simply hanging indefinitely) - then this is fine (no retain loop).

    In this case, the retain loop would always get broken at some point.

提交回复
热议问题