Please read the basic memory management rules again.
You didn't create the NSURLRequest
using a method containing the words “alloc”, “new”, “copy”, or “mutableCopy”, so you don't own it, so you shouldn't release it.
Also, you are not "calling an asynchronous function". When you call [webView loadRequest:]
, the method call happens immediately and synchronously. That method starts some asynchronous work behind the scenes, which completes later on -- but that doesn't affect the way that you call the method in the first place, or the memory management for its arguments.