Click here to Skip to main content
16,010,876 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: [SOS]Winsock in ATL Dll [SOS] Pin
Eytukan28-Sep-06 6:32
Eytukan28-Sep-06 6:32 
GeneralRe: [SOS]Winsock in ATL Dll [SOS] Pin
led mike28-Sep-06 6:52
led mike28-Sep-06 6:52 
GeneralRe: [SOS]Winsock in ATL Dll [SOS] Pin
Eytukan28-Sep-06 7:51
Eytukan28-Sep-06 7:51 
AnswerRe: [SOS]Winsock in ATL Dll [SOS] Pin
Eytukan12-Oct-06 18:24
Eytukan12-Oct-06 18:24 
QuestionATL,WTL time object in debug and release config Pin
Samy_Ibraheem_Mo26-Sep-06 7:20
Samy_Ibraheem_Mo26-Sep-06 7:20 
GeneralFunction object destructor called multiple times in std::for_each loop Pin
Rob Caldecott26-Sep-06 7:02
Rob Caldecott26-Sep-06 7:02 
GeneralA solution, of sorts Pin
Rob Caldecott26-Sep-06 7:21
Rob Caldecott26-Sep-06 7:21 
GeneralRe: Function object destructor called multiple times in std::for_each loop Pin
Zac Howland26-Sep-06 8:25
Zac Howland26-Sep-06 8:25 
STL passes many things by copy. Thus, while the default constructor is only called once, the copy-constructor may be called many times. To see this, modify your code slightly:

struct function_object
{
	function_object()
	{
		std::cout << "function_object : " << this << std::endl;
	}

	function_object(const function_object& obj)
	{
		std::cout << "function_object (copy): " << this << std::endl;
	}

	~function_object()
	{
		std::cout << "~function_object : " << this << std::endl;
	}

	void operator()(int n) const
	{
		std::cout << n << std::endl;
	}
};


If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac

GeneralRe: Function object destructor called multiple times in std::for_each loop Pin
Rob Caldecott26-Sep-06 8:30
Rob Caldecott26-Sep-06 8:30 
GeneralRe: Function object destructor called multiple times in std::for_each loop Pin
Zac Howland26-Sep-06 8:43
Zac Howland26-Sep-06 8:43 
GeneralRe: Function object destructor called multiple times in std::for_each loop Pin
Rob Caldecott26-Sep-06 10:17
Rob Caldecott26-Sep-06 10:17 
GeneralRe: Function object destructor called multiple times in std::for_each loop Pin
Zac Howland26-Sep-06 10:59
Zac Howland26-Sep-06 10:59 
Questionwhat is WTL ? Pin
Sakthiu26-Sep-06 3:36
Sakthiu26-Sep-06 3:36 
AnswerRe: what is WTL ? Pin
led mike26-Sep-06 7:30
led mike26-Sep-06 7:30 
AnswerRe: what is WTL ? Pin
Michael Dunn2-Oct-06 7:35
sitebuilderMichael Dunn2-Oct-06 7:35 
GeneralRe: what is WTL ? Pin
Steve S27-Sep-06 1:22
Steve S27-Sep-06 1:22 
QuestionBHO cpu usage is too high Pin
daheitou26-Sep-06 3:10
daheitou26-Sep-06 3:10 
QuestionWTL code wrappers for Scintilla Pin
Igor Vigdorchik25-Sep-06 8:29
Igor Vigdorchik25-Sep-06 8:29 
AnswerRe: WTL code wrappers for Scintilla Pin
Alain Rist25-Sep-06 12:43
Alain Rist25-Sep-06 12:43 
GeneralRe: WTL code wrappers for Scintilla Pin
Igor Vigdorchik25-Sep-06 14:57
Igor Vigdorchik25-Sep-06 14:57 
Questionregister an attributed ATL7 com dll file [modified] Pin
Samy_Ibraheem_Mo24-Sep-06 10:04
Samy_Ibraheem_Mo24-Sep-06 10:04 
AnswerRe: register an attributed ATL7 com dll file Pin
Samy_Ibraheem_Mo24-Sep-06 17:13
Samy_Ibraheem_Mo24-Sep-06 17:13 
AnswerRe: register an attributed ATL7 com dll file Pin
User 21559724-Sep-06 22:31
User 21559724-Sep-06 22:31 
AnswerRe: register an attributed ATL7 com dll file Pin
Zodiacon25-Sep-06 6:59
Zodiacon25-Sep-06 6:59 
QuestionComposite Control Info Pin
Demian Panello21-Sep-06 17:06
Demian Panello21-Sep-06 17:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.