Click here to Skip to main content
16,008,010 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: cube class Pin
Hamid_RT16-Jun-07 9:19
Hamid_RT16-Jun-07 9:19 
QuestionDestroy the memory Pin
Anu_Bala15-Jun-07 20:18
Anu_Bala15-Jun-07 20:18 
AnswerRe: Destroy the memory Pin
Mark Salsbery16-Jun-07 6:55
Mark Salsbery16-Jun-07 6:55 
Questiondelete this within the class function causing problems Pin
Cyrilix15-Jun-07 18:17
Cyrilix15-Jun-07 18:17 
GeneralRe: delete this within the class function causing problems Pin
Matthew Faithfull16-Jun-07 0:18
Matthew Faithfull16-Jun-07 0:18 
GeneralRe: delete this within the class function causing problems Pin
Cyrilix16-Jun-07 5:08
Cyrilix16-Jun-07 5:08 
AnswerRe: delete this within the class function causing problems Pin
Matthew Faithfull16-Jun-07 5:24
Matthew Faithfull16-Jun-07 5:24 
GeneralRe: delete this within the class function causing problems Pin
Cyrilix16-Jun-07 6:06
Cyrilix16-Jun-07 6:06 
Well, I don't exactly want to combine the two together, since ThreadPool should be its own component (and used by other classes as well). This is what I tried and it does fix the problem (as well as the source of the problem).

Given that I call pThreadPool->Release(), it would only make sense to somehow acquire the ThreadPool object from the ThreadPool class itself, so I just created the following static function from within the ThreadPool:

ThreadPool* ThreadPool::Create()
{
	ThreadPool* pThreadPool = new ThreadPool();
	return pThreadPool;
}


Thanks a lot for your help, Matt. I always used to think the "heap" was one global section of memory that the entire process handled, and that any new or delete would dump things onto that heap. It seems like the concept is not so simple and there can be multiple heaps...
AnswerRe: delete this within the class function causing problems Pin
Stephen Hewitt17-Jun-07 12:55
Stephen Hewitt17-Jun-07 12:55 
GeneralRe: delete this within the class function causing problems Pin
Cyrilix17-Jun-07 17:18
Cyrilix17-Jun-07 17:18 
QuestionCreate Standart Animation With V C++ Pin
san_sui15-Jun-07 17:08
san_sui15-Jun-07 17:08 
AnswerRe: Create Standart Animation With V C++ Pin
Hamid_RT15-Jun-07 19:02
Hamid_RT15-Jun-07 19:02 
Questionerror c3409 [modified] Pin
moonraker92815-Jun-07 12:53
moonraker92815-Jun-07 12:53 
AnswerRe: error c3409 Pin
David Crow15-Jun-07 15:58
David Crow15-Jun-07 15:58 
GeneralRe: error c3409 [modified] Pin
moonraker92815-Jun-07 17:09
moonraker92815-Jun-07 17:09 
GeneralRe: error c3409 Pin
David Crow16-Jun-07 15:42
David Crow16-Jun-07 15:42 
QuestionHelp with conversion to VC* - Linker error Pin
b644715-Jun-07 12:31
b644715-Jun-07 12:31 
AnswerRe: Help with conversion to VC* - Linker error Pin
kvrnkiran19-Jun-07 0:02
kvrnkiran19-Jun-07 0:02 
GeneralRe: Help with conversion to VC* - Linker error Pin
b644719-Jun-07 13:51
b644719-Jun-07 13:51 
Questionhaving a class be a member of itself Pin
moonraker92815-Jun-07 12:27
moonraker92815-Jun-07 12:27 
AnswerRe: having a class be a member of itself Pin
markkuk15-Jun-07 12:46
markkuk15-Jun-07 12:46 
GeneralRe: having a class be a member of itself Pin
moonraker92815-Jun-07 12:49
moonraker92815-Jun-07 12:49 
QuestionGDI+ Effects: Blur BrightnessContrast, etc? Pin
HappyFunBall15-Jun-07 11:12
HappyFunBall15-Jun-07 11:12 
AnswerRe: GDI+ Effects: Blur BrightnessContrast, etc? Pin
Mark Salsbery15-Jun-07 12:59
Mark Salsbery15-Jun-07 12:59 
QuestionAuthenticated user Pin
RomTibi15-Jun-07 9:04
RomTibi15-Jun-07 9:04 

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.