Question: I added a jQuery menu tab to my page and there is a clash in the CSS, as can be seen here: <http://newbie-cms.com/demo1>.

I separated a page with only the jQuery tabs here: <http://newbie-cms.com/demo1/channeltabs> and that works fine. Also, the <http://newbie-cms.com/demo1/index.html> page works fine without the tabs.

But once I combine the tabs code with the videos page, the `ul,li` items of the tabs become displaced.

Where, in my CSS, can this be fixed?

Answer: 
Addressing your second issue first, instead of `[[NSMutableDictionary alloc] initWithCapacity:[self count]]` you could use `[NSMutableDictionary dictionaryWithCapacity:[self count]]` which will return an autoreleased object and you will have to retain it yourself in the calling code.

On the other hand, you could rename your method to start with the word copy if you want it to return a retained object and not throw errors - **which I think is exactly what you want to do in this case**. The rest of my response assumes you have taken this path.

My original answer was as follows: You are not releasing oneCopy at the end of each iteration. Try adding `[oneCopy release];` right after `[ret setValue:oneCopy forKey:key];`.

However, as [Alexsander Akers points out](https://stackoverflow.com/questions/8072361/obj-c-analyzer-issuse-potential-leak-of-an-object-allocated-on-line-25-and-sto/8085506#8085506) the compiler thinks that -mutableDeepCopy has a 0 refcount. So, if you rename as suggested above and include `[oneCopy release]` as I originally suggested it should take care of both issues. If it doesn't, definitely check out some of the other solutions in the question he referenced.

Example:

```
@implementation NSDictionary(DeepMutableCopy)
-(NSMutableDictionary *)copyWithDeepCopiedValues
{
    NSMutableDictionary *ret = [[NSMutableDictionary alloc] initWithCapacity:[self count]];

    NSArray *keys = [self allKeys];
    for (id key in keys)
    {
        id oneValue = [self valueForKey:key];
        id oneCopy = nil;

        if ([oneValue respondsToSelector:@selector(mutableDeepCopy)])
            oneCopy = [oneValue copyWithDeepCopiedValues];
        else if ([oneValue respondsToSelector:@selector(mutableCopy)])
            oneCopy = [oneValue mutableCopy];
        if (oneCopy == nil)
            oneCopy = [oneValue copy];
        [ret setObject:oneCopy forKey:key];

        [oneCopy release];
    }

    return ret;
}
@end

```
There are two problems here. First, as @David Brainer-Banker says, you need to release `oneCopy` at the end of each iteration by placing `[oneCopy release]; after you set`[ret setValue:oneCopy forKey:key];`.

The incorrect reference count decrement is the second problem. This is because the `oneCopy` object may have a `+1` or a `0` reference count. The objects returned by `-copy` and `-mutableCopy` have a `+1` refcount, but the object returned by `-deepMutableCopy` has a `0` refcount because it isn't in the `new`, `copy`, or `create` (et al.) families.

This question is an exact duplicate of [this one](https://stackoverflow.com/questions/7770872/deep-copy-of-dictionaries-gives-analyze-error-in-xcode-4-2) and has some great responses.