< Previous by Date | Date Index | Next by Date > |
Thread Index | Next in Thread > |
virtual ContactRecordList getContacts(const Uri& aor) = 0;
When this function is used like:
ContactRecordList mContacts = pStore->getContacts(aor);
then the contents of
the returned list get assigned to
mContacts, but the internal
ContactRecordList gets
destroyed which causes it to destroy(delete) all
elements
and this is causing the heap corruption because the
elements are
still present in mContacts.
To proof this is
skipped the delete in the debugger and
the corruption message does not
occur.
How can we solve this problem? (or am I missing something?)
What about making getContacts return shared_ptr<ContactRecordList>?
Best regards,
Matthias Moetje
TERASENS
GmbH Augustenstraße 24 80333 Munich GERMANY |
|