User Data lost?


I write a key value in a object.

ON_wString strKey, strValue;
strValue.Format(_T("%d"), iTypeValue);
int iCount = m_ObjRefArray->GetCount();
for ( int i=0; i<iCount; i++ )
	CRhinoObjRef objRef = m_ObjRefArray->GetAt(i);

	CRhinoObject* pObj = (CRhinoObject*)objRef.Object();
	CRhinoObjectAttributes Attrib( pObj->Attributes() );
	Attrib.SetUserString( strKey, strValue );

After many operations, the key value lost.
I failed to get data using GetUserString().
The user is not sure what operations he did.
Is any operations can make user data lost?

Let me know if this example is helpful (or not).

– Dale