Re: Passing more than 1 param in AfxBeginThread
From: Dazz (anonymous_at_discussions.microsoft.com)
Date: 05/19/04
- Next message: Mark Robinson: "Re: malloc() vs "new" vs HeapAlloc() vs ..."
- Previous message: Rafael: "Re: A question in an interview"
- In reply to: Joseph M. Newcomer: "Re: Passing more than 1 param in AfxBeginThread"
- Next in thread: Scott McPhillips [MVP]: "Re: Passing more than 1 param in AfxBeginThread"
- Reply: Scott McPhillips [MVP]: "Re: Passing more than 1 param in AfxBeginThread"
- Reply: Jerry Coffin: "Re: Passing more than 1 param in AfxBeginThread"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 19 May 2004 08:26:05 -0700
Thanks Joe,
I have a question about your solution. what is the difference between declaring the the pointer *p on the heap and then deleting after finishing with it, and just declaring it on the stack?
class Parameters {
public:
int x;
int y;
CWnd * wnd;
};
Parameters *p;
p->x = ...
p-> = ...
p->wnd = this;
AfxBeginThread(thread, p);
What i want to know is when should i declare a var on the heap instead of on the stack?
i.e
CClass *p = new (CClass) against CClass *p
cheers
Dazz
- Next message: Mark Robinson: "Re: malloc() vs "new" vs HeapAlloc() vs ..."
- Previous message: Rafael: "Re: A question in an interview"
- In reply to: Joseph M. Newcomer: "Re: Passing more than 1 param in AfxBeginThread"
- Next in thread: Scott McPhillips [MVP]: "Re: Passing more than 1 param in AfxBeginThread"
- Reply: Scott McPhillips [MVP]: "Re: Passing more than 1 param in AfxBeginThread"
- Reply: Jerry Coffin: "Re: Passing more than 1 param in AfxBeginThread"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|