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

C / C++ / MFC

 
JokeRe: cube class Pin
Hamid_RT16-Jun-07 9:18
Hamid_RT16-Jun-07 9:18 
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 
It's not the class that will have it's own heap it's the DLL. If you statically link a DLL to the CRT, e.g. LIBCMTD.LIB then the heap code get compiled into the DLL and it therefore gets it's own heap whenever it is loaded. If it's later used with an EXE that links to the CRT either statically or dynamically then they have 2 separate heaps.
If everything links dynamically then every module uses the one MSVCRT.DLL loaded into the process and they all share the one heap. It sounds like a plausible cause for your error if ThreadPool is in its own DLL. I'll try a little ASCII art as I'm not that good at explaining it.Big Grin | :-D

--MY.exe Process space in memory--
[
{
//Main function is here
//new or delete here uses late bound MSVCRT.Dll
}

--Kernel32.Dll--
--OtherWindows.Dll--

--ThreadPool.Dll--
[
{
//ThreadPool code is here
//new or delete here is fixed at compile time to call LIBCMTD code linked in below
}
LIBCMTD.LIB link inserts CRT code here
{
//ThreadPool.Dll is early bound to this code so it uses this heap
//Heap code is here
}
]

--MoreWindows.Dll--
--MSVCRT.Dll--
{
//This dynamically linked code is used by MY.exe which binds to it after it's loaded
//Heap code is here
}
]


Nothing is exactly what it seems but everything with seems can be unpicked.

GeneralRe: delete this within the class function causing problems Pin
Cyrilix16-Jun-07 6:06
Cyrilix16-Jun-07 6:06 
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 

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.