Adding an attribute that has a new value, but has the same name as an existing attribute, replaces the existing attribute. And, because internal attributes are reference counted, they are not deleted until all of their shared attributes are deleted.
// Create a simple group
TSimpleAttributeGroup aGroup;
// Create some attributes
TOneAttribute oneA("one A");
TTwoAttribute twoB("two B"); // different name from A
TOneAttribute oneC("one C"); // same name as A but different value
aGroup.Add(oneA);
aGroup.Add(twoB); // doesn't replace A since names differ
aGroup.Add(oneC); // replaces A with C since names are equal
long count = aGroup.Count(); // count is "2", for B and C
// Deletes attributeC from the group, since it has the same name as A.
aGroup.Delete(oneA);
count = aGroup.Count(); // count is "1", for B