ATL OOM Resource leaks, and inconsistent behavior?
- From: "Leon" <Leon@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Fri, 29 Apr 2005 09:18:11 -0700
I have written an ATL OOM based Outlook addin that traverses folders and
returns certain selected appointment items. It uses both OOM and Redemption.
When traversing lots of large folders, the addin and outlook come to a
crawl and it gets to a point where I experience unexplained crashes and
failures to QueryInterface even though they worked before in a previous
iteration. I had a memory leak associated with string properties such as
Subject etc where I was not freeing after obtaining and using. I am doing
all the freeing now and even though I am using far less memory now, I still
get to a point where items stop being returned from the items collection and
QueryInterface stops working. It seems to me like the items are not being
released. Any insight is highly appreciated. Here is the abridged version
of the loop through the folder:
Redemption::ISafeAppointmentItemPtr sappt("Redemption.SafeAppointmentItem");
IDispatch *iAppt = NULL;
for (hr = items->GetFirst(&iAppt); iAppt != NULL && !FAILED(hr);
iAppt->Release(), iAppt =NULL, hr = items->GetNext(&iAppt))
{
CComQIPtr<Outlook::_AppointmentItem> appt(iAppt);
sappt->put_Item(appt);
//retrieve properties , etc.
}
Is it possible that the redemption sappt is preventing appt from getting
released?
.
- Follow-Ups:
- Re: ATL OOM Resource leaks, and inconsistent behavior?
- From: Dan Mitchell
- Re: ATL OOM Resource leaks, and inconsistent behavior?
- Prev by Date: Re: OWA URL from MAPI mailbox store object
- Next by Date: Re: ATL OOM Resource leaks, and inconsistent behavior?
- Previous by thread: Re: Accessing the Empty Deleted Items command
- Next by thread: Re: ATL OOM Resource leaks, and inconsistent behavior?
- Index(es):
Relevant Pages
|
Loading