Question: Can Anyone explain me the following image, that how can I do releasing within this block of code

![enter image description here](https://i.stack.imgur.com/nvRpU.jpg)

why there is issue when some having another object and you are releasing, like 

```
NSURL *url = [NSURL URLWithString:@"some_url_having_image_on_server"];
NSData *data = [[NSData alloc] initWithContentsOfURL:url];      
UIImage *image = [UIImage imageWithData:data];

```

How would I do release and explain the cases, and don't pass me links, just explain in your own programming skill, I really want to clear some concepts of memory management, they ever make me crazy :-(

Thanks In Advance

Answer: 
All Methods without an alloc are autoreleased. So the [UIImage imagedWithData:] will be automatically released at the end of the runloop.
Did you try this: `UIImage *img = [[UIImage alloc] initWithData:data];` and you can release whenever you want.

EDIT:

Also if you try to release created object without alloc method, your app will crash, because you didnt alloc and you didnt say to memory "this place is mine !", then your app will autorelease your object.