Re: delete on _CommandPtr crashes
From: Igor Tandetnik (itandetnik_at_mvps.org)
Date: 06/09/04
- Next message: Michael Hesse: "Re: Creating a DLL"
- Previous message: Igor Tandetnik: "Re: methods of com-object-creation"
- In reply to: Jazper Manto: "delete on _CommandPtr crashes"
- Next in thread: Jazper Manto: "Re: delete on _CommandPtr crashes"
- Reply: Jazper Manto: "Re: delete on _CommandPtr crashes"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 9 Jun 2004 15:50:49 -0400
"Jazper Manto" <ejazper@hotmail.com> wrote in message
news:%233JHhCkTEHA.544@TK2MSFTNGP11.phx.gbl
> i uses ado to get data from the database. but when i use the
> delete-operator on the with new-operator allocated memory, my
> application crashes.
> it says: User breakpoint called from code at 0x77fa144b
>
> --- CODE ----------------------------
> /// CoInitialize-Things
> ADODB::_CommandPtr m_pCmd = new
> ADODB::_CommandPtr(__uuidof(ADODB::Command));
> delete m_pCmd;
Are you sure your actual code looks exactly like this? This should not
even compile. You are assigning _CommandPtr* to _CommandPtr.
--
With best wishes,
Igor Tandetnik
"For every complex problem, there is a solution that is simple, neat,
and wrong." H.L. Mencken
- Next message: Michael Hesse: "Re: Creating a DLL"
- Previous message: Igor Tandetnik: "Re: methods of com-object-creation"
- In reply to: Jazper Manto: "delete on _CommandPtr crashes"
- Next in thread: Jazper Manto: "Re: delete on _CommandPtr crashes"
- Reply: Jazper Manto: "Re: delete on _CommandPtr crashes"
- Messages sorted by: [ date ] [ thread ]