Is there anything wrong with this unusual NSMutableArray setter? This behaves to an outside observer mostly like @property (copy), except it has the very nice property of automatically performing any side effects that may exist in remove&lt;Key&gt;AtIndexes: and insert&lt;Key&gt;:atIndexes:. If I'm going to have such side effects, this seems really handy (DRY!)--is there anything wrong with this strange-looking accessor method?

- (void)setEdges:(NSArray *)newEdges
{
    if (newEdges != edges)
    {
        [self removeEdgesAtIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [edges count])]];
        [edges release];
        edges = nil;
        if (newEdges)
        {
            edges = [NSMutableArray new];
            [self insertEdges:newEdges atIndexes:[NSIndexSet indexSetWithIndexesInRange:NSMakeRange(0, [newEdges count])]];
        }
    }
}
You should add edges = nil; either after [edges release]; or as the else clause. Otherwise passing a nil argument will make edges a dangling pointer to a released object.

Other than that, I don't see any issues with this implementation.