Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Delete[] in DCOM?

Status
Not open for further replies.

Zoktrax

Programmer
Mar 5, 2003
2
SE
Hi everybody!
I have a DCOM COM-object where I store addressdata in a CComBSTR* m_address.
I allocate memory like this.

_Module.m_address = new CComBSTR[*maxIndex];

And fills it with addresses.
At a certain point I need to reinitiate because I get a new addresslist. Then I use delete like this in a reInit-function.

delete[] _Module.m_address;
_Module.m_address = new CComBSTR[*maxIndex];

This works fine to reinit two times but the third time it fails. It's not the correct data in the COM-object. And the way I insert/take out data is not the problem. I'm sure of that.

I can't figure it out why delete stops to work. Plzzzz I need to fix this.

Thanx
Pete
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top