Is this a right code from the point of view of memory management?

```
NSEntityDescription *description = [NSEntityDescription
                                        entityForName:@"Event" inManagedObjectContext:managedObjectContext];
NSFetchRequest *eventRequest = [[[NSFetchRequest alloc] init] autorelease];
[eventRequest setEntity:description];
[description release];

NSPredicate *eventPredicate = [NSPredicate predicateWithFormat:
                                      @"(event == %@)", [item objectForKey:@"event"]];
[eventRequest setPredicate:eventPredicate];

```

Or i need to release description and eventPredicate?

Thanks
['https://Stackoverflow.com/questions/4658963', 'https://Stackoverflow.com', 'https://Stackoverflow.com/users/258863/']
Looking at that code, the only object you own is the `eventRequest`. It is being autoreleased so you don't need to release it again.

From what I can see, based on naming convention, all the other objects aren't owned, so you don't need to release them.

The line `[description release];` will likely cause a crash for you somewhere down the line.
You dont't need any releases for that code. You should read [Apple's documentation](http://developer.apple.com/library/mac/#documentation/cocoa/conceptual/MemoryMgmt/MemoryMgmt.html) to find out why.