Re: Unmanaged C++ object lifetime
From: Bob Altman (rda_at_nospam.com)
Date: 03/13/05
- Next message: Bob Altman: "TCP stream?"
- Previous message: Fredrik Wahlgren: "Re: HOWTO: Call a Managed DLL from MFC C++ Code"
- In reply to: Carl Daniel [VC++ MVP]: "Re: Unmanaged C++ object lifetime"
- Next in thread: Arnaud Debaene: "Re: Unmanaged C++ object lifetime"
- Reply: Arnaud Debaene: "Re: Unmanaged C++ object lifetime"
- Messages sorted by: [ date ] [ thread ]
Date: Sun, 13 Mar 2005 14:24:56 -0800
Thanks a million for the quick answer. That raises the obvious question of
why a copy of my object is given to stack.push() rather than a reference to
it. Intellisense tells me that the function signature is:
void std::stack<string>::push(const std::stack<string>::value_type & _Val)
As I read this gibberish, it looks like my variable is being passed by
reference to the push() routine. I would have expected the string that was
given to my function by reference to be given to push() by reference, not by
value (which would create a copy of the string).
- Next message: Bob Altman: "TCP stream?"
- Previous message: Fredrik Wahlgren: "Re: HOWTO: Call a Managed DLL from MFC C++ Code"
- In reply to: Carl Daniel [VC++ MVP]: "Re: Unmanaged C++ object lifetime"
- Next in thread: Arnaud Debaene: "Re: Unmanaged C++ object lifetime"
- Reply: Arnaud Debaene: "Re: Unmanaged C++ object lifetime"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|