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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

memory allocation

Status
Not open for further replies.

mangocinn

Programmer
Jul 26, 2001
66
US

I have the following lines in my code:

LPUNKNOWN unkSinkPtr;
sinkPtr = new myClass();

unkSinkPtr = sinkPtr->GetIDispatch(FALSE);

GetIDispatch returns a pointer to the IDispatch object associated with the CCmdTarget object.

Do you know exactly where the memory gets allocated?
Is it in my code when I make that call...or is it within GetIDispatch?
 
I'd assume it is allocated when you say new myClass(), and GetIDispatch() just returns a pointer to something that is allocated when you create the myClass object.
 
Status
Not open for further replies.

Similar threads

Part and Inventory Search

Sponsor

Back
Top