In my class Orders, I've 2 functions 'generateOrderSummary' & 'createOrderSummaryItem':

```
- (OrderSummary *)generateOrderSummary {

//Cleaning the references but OrderSummaryItem leaks
[self.currentOrderSummary removeAllOrderedItems];
self.currentOrderSummary = nil;

for(MenuItem *menuItem in self.selectedItems) {

    OrderSummaryItem *orderSummaryItem = [self createOrderSummaryItem:menuItem];
    //Retain count = 1

    [orderSummary addOrderedItem:orderSummaryItem withServiceStationCode:menuItem.serviceStationCode withCategory:menuItem.category withCourseOrder:menuItem.courseOrder];
   //Retain count = 5;
}

self.currentOrderSummary = orderSummary;
[orderSummary release];
orderSummary = nil;

return self.currentOrderSummary;    
}

- (OrderSummaryItem *) createOrderSummaryItem:(MenuItem *)menuItem {

OrderSummaryItem *summaryItem = [[[OrderSummaryItem alloc]init] autorelease];

//Set summaryItem properties    

return summaryItem;
}

```

This' OrderSummary class with 3 NSMutableDictionaries and 1 NSMutableArray all keeping reference to the OrderSummaryItem object.

```
-(void)addOrderedItem:(OrderSummaryItem *)orderedItem withServiceStationCode:(NSString *)serviceStationCode withCategory:(NSString *)category withCourseOrder:(NSString *)courseOrder {

if (self.serviceStationDict == nil) {
    self.serviceStationDict = [NSMutableDictionary dictionaryWithCapacity:1];
}
if (self.categoryDict == nil) {
    self.categoryDict = [NSMutableDictionary dictionaryWithCapacity:1];
}
if (self.courseOrderDict == nil) {
    self.courseOrderDict = [NSMutableDictionary dictionaryWithCapacity:1];
}
if(self.orderedItems == nil) {
    self.orderedItems = [NSMutableArray arrayWithCapacity:1];
}

if(serviceStationCode != nil) {
    NSMutableArray *orderedItemsForServiceStation = [self.serviceStationDict objectForKey:serviceStationCode];
    if (orderedItemsForServiceStation != nil) {
        [orderedItemsForServiceStation addObject:orderedItem];
    }
    else {
        orderedItemsForServiceStation = [NSMutableArray arrayWithCapacity:1];
        [orderedItemsForServiceStation addObject:orderedItem];
        [self.serviceStationDict setObject:orderedItemsForServiceStation forKey:serviceStationCode];
       //Retain count = 2
    }
}

if(category != nil) {
    NSMutableArray *orderedItemsForCategory = [self.categoryDict objectForKey:category];
    if (orderedItemsForCategory != nil) {
        [orderedItemsForCategory addObject:orderedItem];
    }
    else {
        orderedItemsForCategory = [NSMutableArray arrayWithCapacity:1];
        [orderedItemsForCategory addObject:orderedItem];
        [self.categoryDict setObject:orderedItemsForCategory forKey:category];
        //Retain count = 3
    }
}

if(courseOrder != nil) {
    NSMutableArray *orderedItemsForCourseOrder = [self.courseOrderDict objectForKey:courseOrder];
    if (orderedItemsForCourseOrder != nil) {
        [orderedItemsForCourseOrder addObject:orderedItem];
    }
    else {
        orderedItemsForCourseOrder = [NSMutableArray arrayWithCapacity:1];
        [orderedItemsForCourseOrder addObject:orderedItem];
        [self.courseOrderDict setObject:orderedItemsForCourseOrder forKey:courseOrder];   
       //Retain count = 4
    }
}
[self.orderedItems addObject:orderedItem];  
      //Retain count = 5
}

-(void)removeAllOrderedItems{

[self.serviceStationDict removeAllObjects];
self.serviceStationDict = nil;
[self.categoryDict removeAllObjects];
self.categoryDict = nil;
[self.courseOrderDict removeAllObjects];
self.courseOrderDict = nil;
[self.orderedItems removeAllObjects];
self.orderedItems = nil;
}

```

I'm not able to find out why my OrderSummaryItem is leaking despite cleaning it. My 'generateOrderSummary' function is called every 5 seconds to refresh the view.