ret = contacts_vcard_make_from_contact(recordHandle, &pVcardStream);
SysTryReturn(NID_SCL, ret != CONTACTS_ERROR_INVALID_PARAMETER, null, E_INVALID_ARG, "[%s] Invalid argument is used.", GetErrorMessage(E_INVALID_ARG));
SysTryReturn(NID_SCL, ret != CONTACTS_ERROR_SYSTEM, null, E_SYSTEM, "[%s] A system error has been occurred.", GetErrorMessage(E_SYSTEM));
-
SysTryReturn(NID_SCL, ret == CONTACTS_ERROR_NONE, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- std::unique_ptr<char> pChar(pVcardStream);
-
std::unique_ptr<ByteBuffer> pByteBuffer(new (std::nothrow) ByteBuffer);
- SysTryReturn(NID_SCL, pByteBuffer != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ if (pByteBuffer == null)
+ {
+ free(pVcardStream);
+ SysLogException(NID_SCL, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- result r = pByteBuffer->Construct(strlen(pChar.get()));
- SysTryReturn(NID_SCL, !IsFailed(r), null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ return null;
+ }
+
+ result r = pByteBuffer->Construct(strlen(pVcardStream));
+ if (IsFailed(r))
+ {
+ free(pVcardStream);
+ SysLogException(NID_SCL, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- r = pByteBuffer->SetArray(reinterpret_cast<byte*>(pChar.get()), 0, strlen(pChar.get()));
+ return null;
+ }
+
+ r = pByteBuffer->SetArray(reinterpret_cast<byte*>(pVcardStream), 0, strlen(pVcardStream));
+ free(pVcardStream);
SysTryReturn(NID_SCL, r != E_OUT_OF_MEMORY, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
SysTryReturn(NID_SCL, r == E_SUCCESS, null, E_SYSTEM, "[%s] A system error has been occurred.", GetErrorMessage(E_SYSTEM));
int capacity = 0;
contacts_record_h recordHandle = null;
- std::unique_ptr<char> pChar(null);
std::unique_ptr<IEnumerator> pEnum(contactList.GetEnumeratorN());
SysTryReturn(NID_SCL, pEnum != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
ret = contacts_vcard_make_from_contact(recordHandle, &pVcardStream);
SysTryReturn(NID_SCL, ret != CONTACTS_ERROR_INVALID_PARAMETER, null, E_INVALID_ARG, "[%s] Invalid argument is used.", GetErrorMessage(E_INVALID_ARG));
SysTryReturn(NID_SCL, ret != CONTACTS_ERROR_SYSTEM, null, E_SYSTEM, "[%s] A system error has been occurred.", GetErrorMessage(E_SYSTEM));
-
SysTryReturn(NID_SCL, ret == CONTACTS_ERROR_NONE, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- pChar.reset(pVcardStream);
-
- capacity += strlen(pChar.get());
+ capacity += strlen(pVcardStream);
r = pByteBuffer->ExpandCapacity(capacity);
- SysTryReturn(NID_SCL, !IsFailed(r), null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ if (IsFailed(r))
+ {
+ free(pVcardStream);
+ SysLogException(NID_SCL, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ return null;
+ }
- r = pByteBuffer->SetArray(reinterpret_cast<byte*>(pChar.get()), 0, strlen(pChar.get()));
+ r = pByteBuffer->SetArray(reinterpret_cast<byte*>(pVcardStream), 0, strlen(pVcardStream));
+ free(pVcardStream);
+ pVcardStream = null;
SysTryReturn(NID_SCL, r == E_SUCCESS, null, E_SYSTEM, "[%s] A system error has been occurred.: capacity(%d), size(%d)", GetErrorMessage(E_SYSTEM));
}
SysTryReturn(NID_SCL, ret != CONTACTS_ERROR_INVALID_PARAMETER, null, E_INVALID_ARG, "[%s] Invalid argument is used.", GetErrorMessage(E_INVALID_ARG));
SysTryReturn(NID_SCL, ret == CONTACTS_ERROR_NONE, null, E_SYSTEM, "[%s] A system error has been occurred.", GetErrorMessage(E_SYSTEM));
- std::unique_ptr<char> pChar(pVcardStream);
-
std::unique_ptr<ByteBuffer> pByteBuffer(new (std::nothrow) ByteBuffer);
- SysTryReturn(NID_SCL, pByteBuffer != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ if (pByteBuffer == null)
+ {
+ free(pVcardStream);
+ SysLogException(NID_SCL, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- result r = pByteBuffer->Construct(strlen(pChar.get()));
- SysTryReturn(NID_SCL, !IsFailed(r), null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ return null;
+ }
+
+ result r = pByteBuffer->Construct(strlen(pVcardStream));
+ if (IsFailed(r))
+ {
+ free(pVcardStream);
+ SysLogException(NID_SCL, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ return null;
+ }
- r = pByteBuffer->SetArray(reinterpret_cast<byte*>(pChar.get()), 0, strlen(pChar.get()));
+ r = pByteBuffer->SetArray(reinterpret_cast<byte*>(pVcardStream), 0, strlen(pVcardStream));
+ free(pVcardStream);
SysTryReturn(NID_SCL, r == E_SUCCESS, null, E_SYSTEM, "[%s] A system error has been occurred.", GetErrorMessage(E_SYSTEM));
return pByteBuffer.release();
contacts_record_h personRecordHandle = null;
__ContactsRecordHandle recordHandle(null);
- std::unique_ptr<char> pChar(null);
std::unique_ptr<IEnumerator> pEnum(personList.GetEnumeratorN());
SysTryReturn(NID_SCL, pEnum != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
SysTryReturn(NID_SCL, ret != CONTACTS_ERROR_INVALID_PARAMETER, null, E_INVALID_ARG, "[%s] Invalid argument is used.", GetErrorMessage(E_INVALID_ARG));
SysTryReturn(NID_SCL, ret == CONTACTS_ERROR_NONE, null, E_SYSTEM, "[%s] A system error has been occurred.", GetErrorMessage(E_SYSTEM));
- pChar.reset(pVcardStream);
-
- capacity += strlen(pChar.get());
+ capacity += strlen(pVcardStream);
r = pByteBuffer->ExpandCapacity(capacity);
- SysTryReturn(NID_SCL, !IsFailed(r), null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ if (IsFailed(r))
+ {
+ free(pVcardStream);
+ SysLogException(NID_SCL, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ return null;
+ }
- r = pByteBuffer->SetArray(reinterpret_cast<byte*>(pChar.get()), 0, strlen(pChar.get()));
+ r = pByteBuffer->SetArray(reinterpret_cast<byte*>(pVcardStream), 0, strlen(pVcardStream));
+ free(pVcardStream);
+ pVcardStream = null;
SysTryReturn(NID_SCL, r == E_SUCCESS, null, E_SYSTEM, "[%s] A system error has been occurred.", GetErrorMessage(E_SYSTEM));
}
contacts_list_get_count(listHandle, &count);
std::unique_ptr<ArrayList, AllElementsDeleter> pList(new (std::nothrow) ArrayList());
- SysTryReturn(NID_SCL, pList != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ if (pList == null)
+ {
+ contacts_list_destroy(listHandle, true);
+ SysLogException(NID_SCL, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ return null;
+ }
r = pList->Construct(count);
- SysTryReturn(NID_SCL, !IsFailed(r), null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ if (IsFailed(r))
+ {
+ contacts_list_destroy(listHandle, true);
+ SysLogException(NID_SCL, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ return null;
+ }
for (int i = 0; i < count; i++)
{
std::unique_ptr<Contact> pContact(new (std::nothrow) Contact());
- SysTryReturn(NID_SCL, pContact != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ if (pContact == null)
+ {
+ contacts_list_destroy(listHandle, true);
+ SysLogException(NID_SCL, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- contacts_list_get_current_record_p(listHandle, &recordHandle);
+ return null;
+ }
- _ContactImpl::GetInstance(*pContact)->SetContactRecordHandle(recordHandle);
r = pList->Add(pContact.get());
- SysTryReturn(NID_SCL, !IsFailed(r), null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ if (IsFailed(r))
+ {
+ contacts_list_destroy(listHandle, true);
+ SysLogException(NID_SCL, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ return null;
+ }
pContact.release();
+ }
+
+ std::unique_ptr<IEnumerator> pEnum(pList->GetEnumeratorN());
+
+ while (pEnum->MoveNext() == E_SUCCESS)
+ {
+ Contact* pContact = static_cast <Contact*> (pEnum->GetCurrent());
+
+ contacts_list_get_current_record_p(listHandle, &recordHandle);
+ _ContactImpl::GetInstance(*pContact)->SetContactRecordHandle(recordHandle);
ret = contacts_list_next(listHandle);
- if (ret != CONTACTS_ERROR_NONE)
- {
- break;
- }
}
+ contacts_list_destroy(listHandle, false);
+
return pList.release();
}
SysTryReturn(NID_SCL, ret != CONTACTS_ERROR_SYSTEM, null, E_SYSTEM, "[%s] A system error has been occurred.", GetErrorMessage(E_SYSTEM));
SysTryReturn(NID_SCL, ret == CONTACTS_ERROR_NONE, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- std::unique_ptr<char> pChar(pVcardStream);
-
std::unique_ptr<ByteBuffer> pByteBuffer(new (std::nothrow) ByteBuffer);
+ if (pByteBuffer == null)
+ {
+ free(pVcardStream);
+ SysLogException(NID_SCL, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ return null;
+ }
SysTryReturn(NID_SCL, pByteBuffer != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- result r = pByteBuffer->Construct(strlen(pChar.get()));
- SysTryReturn(NID_SCL, !IsFailed(r), null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ result r = pByteBuffer->Construct(strlen(pVcardStream));
+ if (IsFailed(r))
+ {
+ free(pVcardStream);
+ SysLogException(NID_SCL, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- r = pByteBuffer->SetArray(reinterpret_cast<byte*>(pChar.get()), 0, strlen(pChar.get()));
+ return null;
+ }
+
+ r = pByteBuffer->SetArray(reinterpret_cast<byte*>(pVcardStream), 0, strlen(pVcardStream));
+ free(pVcardStream);
SysTryReturn(NID_SCL, r != E_OUT_OF_MEMORY, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
SysTryReturn(NID_SCL, r == E_SUCCESS, null, E_SYSTEM, "[%s] A system error has been occurred.", GetErrorMessage(E_SYSTEM));
result r = E_SUCCESS;
int capacity = 0;
- std::unique_ptr<char> pChar(null);
-
std::unique_ptr<IEnumerator> pEnum(userProfileList.GetEnumeratorN());
SysTryReturn(NID_SCL, pEnum != null, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
SysTryReturn(NID_SCL, ret != CONTACTS_ERROR_SYSTEM, null, E_SYSTEM, "[%s] A system error has been occurred.", GetErrorMessage(E_SYSTEM));
SysTryReturn(NID_SCL, ret == CONTACTS_ERROR_NONE, null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
- pChar.reset(pVcardStream);
-
- capacity += strlen(pChar.get());
+ capacity += strlen(pVcardStream);
r = pByteBuffer->ExpandCapacity(capacity);
- SysTryReturn(NID_SCL, !IsFailed(r), null, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+ if (IsFailed(r))
+ {
+ free(pVcardStream);
+ SysLogException(NID_SCL, E_OUT_OF_MEMORY, "[%s] Memory allocation failed.", GetErrorMessage(E_OUT_OF_MEMORY));
+
+ return null;
+ }
- r = pByteBuffer->SetArray(reinterpret_cast<byte*>(pChar.get()), 0, strlen(pChar.get()));
+ r = pByteBuffer->SetArray(reinterpret_cast<byte*>(pVcardStream), 0, strlen(pVcardStream));
+ free(pVcardStream);
SysTryReturn(NID_SCL, r == E_SUCCESS, null, E_SYSTEM, "[%s] A system error has been occurred.: capacity(%d), size(%d)", GetErrorMessage(E_SYSTEM));
}
else
{
contacts_record_remove_child_record(__contactHandle, _contacts_contact.image, imageHandle);
+ contacts_record_destroy(imageHandle, true);
}
}
else
if (value.IsEmpty() && IsEmptyName(nameHandle))
{
contacts_record_remove_child_record(__contactHandle, _contacts_contact.name, nameHandle);
+ contacts_record_destroy(nameHandle, true);
}
}
else
if (value.IsEmpty() && IsEmptyName(nameHandle))
{
contacts_record_remove_child_record(__contactHandle, _contacts_contact.name, nameHandle);
+ contacts_record_destroy(nameHandle, true);
}
}
else
if (value.IsEmpty() && IsEmptyName(nameHandle))
{
contacts_record_remove_child_record(__contactHandle, _contacts_contact.name, nameHandle);
+ contacts_record_destroy(nameHandle, true);
}
}
else
if (value.IsEmpty() && IsEmptyName(nameHandle))
{
contacts_record_remove_child_record(__contactHandle, _contacts_contact.name, nameHandle);
+ contacts_record_destroy(nameHandle, true);
}
}
if (value.IsEmpty() && IsEmptyName(nameHandle))
{
contacts_record_remove_child_record(__contactHandle, _contacts_contact.name, nameHandle);
+ contacts_record_destroy(nameHandle, true);
}
}
else
}
contacts_record_remove_child_record(__contactHandle, _contacts_contact.nickname, nicknameHandle);
+ contacts_record_destroy(nicknameHandle, true);
}
}
}
}
contacts_record_remove_child_record(__contactHandle, _contacts_contact.company, companyHandle);
+ contacts_record_destroy(companyHandle, true);
}
}
}
}
contacts_record_remove_child_record(__contactHandle, _contacts_contact.company, companyHandle);
+ contacts_record_destroy(companyHandle, true);
}
}
}
contacts_record_remove_child_record(__contactHandle, _contacts_contact.note, noteHandle);
+ contacts_record_destroy(noteHandle, true);
}
}
}
if (value.IsEmpty() && IsEmptyName(phoneticNameHandle))
{
contacts_record_remove_child_record(__contactHandle, _contacts_contact.name, phoneticNameHandle);
+ contacts_record_destroy(phoneticNameHandle, true);
}
}
else
if (value.IsEmpty() && IsEmptyName(phoneticNameHandle))
{
contacts_record_remove_child_record(__contactHandle, _contacts_contact.name, phoneticNameHandle);
+ contacts_record_destroy(phoneticNameHandle, true);
}
}
else
if (value.IsEmpty() && IsEmptyName(phoneticNameHandle))
{
contacts_record_remove_child_record(__contactHandle, _contacts_contact.name, phoneticNameHandle);
+ contacts_record_destroy(phoneticNameHandle, true);
}
}
else
contacts_record_get_child_record_at_p(__contactHandle, _contacts_contact.number, index, &recordHandle);
contacts_record_remove_child_record(__contactHandle, _contacts_contact.number, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case CONTACT_MPROPERTY_ID_EMAILS:
contacts_record_get_child_record_at_p(__contactHandle, _contacts_contact.email, index, &recordHandle);
contacts_record_remove_child_record(__contactHandle, _contacts_contact.email, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case CONTACT_MPROPERTY_ID_URLS:
contacts_record_get_child_record_at_p(__contactHandle, _contacts_contact.url, index, &recordHandle);
contacts_record_remove_child_record(__contactHandle, _contacts_contact.url, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case CONTACT_MPROPERTY_ID_ADDRESSES:
contacts_record_get_child_record_at_p(__contactHandle, _contacts_contact.address, index, &recordHandle);
contacts_record_remove_child_record(__contactHandle, _contacts_contact.address, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case CONTACT_MPROPERTY_ID_IMADDRESSES:
contacts_record_get_child_record_at_p(__contactHandle, _contacts_contact.messenger, index, &recordHandle);
contacts_record_remove_child_record(__contactHandle, _contacts_contact.messenger, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case CONTACT_MPROPERTY_ID_ORGANIZATIONS:
contacts_record_get_child_record_at_p(__contactHandle, _contacts_contact.company, index, &recordHandle);
contacts_record_remove_child_record(__contactHandle, _contacts_contact.company, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case CONTACT_MPROPERTY_ID_EVENTS:
contacts_record_get_child_record_at_p(__contactHandle, _contacts_contact.event, index, &recordHandle);
contacts_record_remove_child_record(__contactHandle, _contacts_contact.event, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case CONTACT_MPROPERTY_ID_RELATIONSHIPS:
contacts_record_get_child_record_at_p(__contactHandle, _contacts_contact.relationship, index, &recordHandle);
contacts_record_remove_child_record(__contactHandle, _contacts_contact.relationship, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case CONTACT_MPROPERTY_ID_NOTES:
contacts_record_get_child_record_at_p(__contactHandle, _contacts_contact.note, index, &recordHandle);
contacts_record_remove_child_record(__contactHandle, _contacts_contact.note, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case CONTACT_MPROPERTY_ID_NICKNAMES:
contacts_record_get_child_record_at_p(__contactHandle, _contacts_contact.nickname, index, &recordHandle);
contacts_record_remove_child_record(__contactHandle, _contacts_contact.nickname, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
default:
else
{
errCode = contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.image, imageHandle);
+ contacts_record_destroy(imageHandle, true);
SysTryReturn(NID_SCL, errCode != CONTACTS_ERROR_INVALID_PARAMETER, E_SYSTEM, E_SYSTEM,
"[%s] An Invalid Paramenter has been passed", GetErrorMessage(E_SYSTEM));
}
if (value.IsEmpty() && IsEmptyName(nameHandle))
{
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.name, nameHandle);
+ contacts_record_destroy(nameHandle, true);
}
}
else
if (value.IsEmpty() && IsEmptyName(nameHandle))
{
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.name, nameHandle);
+ contacts_record_destroy(nameHandle, true);
}
}
else
if (value.IsEmpty() && IsEmptyName(nameHandle))
{
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.name, nameHandle);
+ contacts_record_destroy(nameHandle, true);
}
}
else
if (value.IsEmpty() && IsEmptyName(nameHandle))
{
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.name, nameHandle);
+ contacts_record_destroy(nameHandle, true);
}
}
if (value.IsEmpty() && IsEmptyName(nameHandle))
{
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.name, nameHandle);
+ contacts_record_destroy(nameHandle, true);
}
}
else
if (value.IsEmpty() && IsEmptyName(nameHandle))
{
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.name, nameHandle);
+ contacts_record_destroy(nameHandle, true);
}
}
else
if (value.IsEmpty() && IsEmptyName(nameHandle))
{
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.name, nameHandle);
+ contacts_record_destroy(nameHandle, true);
}
}
else
if (value.IsEmpty() && IsEmptyName(nameHandle))
{
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.name, nameHandle);
+ contacts_record_destroy(nameHandle, true);
}
}
else
contacts_record_get_child_record_at_p(__profileHandle, _contacts_my_profile.number, index, &recordHandle);
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.number, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case USER_PROFILE_MPROPERTY_ID_EMAILS:
contacts_record_get_child_record_at_p(__profileHandle, _contacts_my_profile.email, index, &recordHandle);
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.email, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case USER_PROFILE_MPROPERTY_ID_URLS:
contacts_record_get_child_record_at_p(__profileHandle, _contacts_my_profile.url, index, &recordHandle);
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.url, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case USER_PROFILE_MPROPERTY_ID_ADDRESSES:
contacts_record_get_child_record_at_p(__profileHandle, _contacts_my_profile.address, index, &recordHandle);
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.address, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case USER_PROFILE_MPROPERTY_ID_IMADDRESSES:
contacts_record_get_child_record_at_p(__profileHandle, _contacts_my_profile.messenger, index, &recordHandle);
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.messenger, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case USER_PROFILE_MPROPERTY_ID_ORGANIZATIONS:
contacts_record_get_child_record_at_p(__profileHandle, _contacts_my_profile.company, index, &recordHandle);
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.company, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case USER_PROFILE_MPROPERTY_ID_EVENTS:
contacts_record_get_child_record_at_p(__profileHandle, _contacts_my_profile.event, index, &recordHandle);
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.event, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case USER_PROFILE_MPROPERTY_ID_RELATIONSHIPS:
contacts_record_get_child_record_at_p(__profileHandle, _contacts_my_profile.relationship, index, &recordHandle);
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.relationship, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case USER_PROFILE_MPROPERTY_ID_NOTES:
contacts_record_get_child_record_at_p(__profileHandle, _contacts_my_profile.note, index, &recordHandle);
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.note, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
case USER_PROFILE_MPROPERTY_ID_NICKNAMES:
contacts_record_get_child_record_at_p(__profileHandle, _contacts_my_profile.nickname, index, &recordHandle);
contacts_record_remove_child_record(__profileHandle, _contacts_my_profile.nickname, recordHandle);
+ contacts_record_destroy(recordHandle, true);
break;
default:
}
return E_SUCCESS;
-
}
IList*