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 Rhinorhino 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
Joined
Jul 26, 2001
Messages
66
Location
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

Replies
7
Views
663
  • Locked
  • Question Question
Replies
1
Views
294
Replies
7
Views
502
  • Locked
  • Question Question
Replies
5
Views
426

Part and Inventory Search

Sponsor

Back
Top