[prev in list] [next in list] [prev in thread] [next in thread] 

List:       ms-atl
Subject:    Re: CComVariant pointer
From:       MICHAEL McINTOSH <mmcintosh () RM ! COM>
Date:       2000-06-30 14:16:51
[Download RAW message or body]


Hi Anindya,

Not sure exactly what your code does, but the following works ok.

CComVariant * pv = new CComVariant[10];

// Using the variants here...

delete [] pv;

What error are you getting ?

Mike

-----Original Message-----
From: Anindya_Dey [mailto:Anindya_Dey@CMR.SATYAM.COM]
Sent: 30 June 2000 14:25
To: ATL@DISCUSS.MICROSOFT.COM
Subject: CComVariant pointer


Hi,
I have a problem with the Ccomvariant array.
 I have dynamically allocated memory to the CComvariant variable
Like this
Cvvariable= new CcomVariant[lubound]

Now the problem is how do I delete the pointer or free the memory at the end
of the function.
I have tried

Delete[] cvvariable;

But this gives an error . Is there any other method.
Thanks.
Anindya Dey.

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html


STANDARD DISCLAIMER: This message is confidential. You should not copy it or
disclose its contents to anyone. You may use and apply the information only
for the intended purpose. Internet communications are not secure and
therefore RM does not accept legal responsibility for the contents of this
message. Any views or opinions presented are only those of the author and
not those of RM. If this email has come to you in error please delete it and
any attachments.

----------------------------------------------------------------
Users Guide http://msdn.microsoft.com/workshop/essentials/mail.asp
contains important info including how to unsubscribe.  Save time, search
the archives at http://discuss.microsoft.com/archives/index.html

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic