Click here to Skip to main content
15,908,618 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: help in erasing the part of string Pin
CPallini14-Dec-08 21:53
mveCPallini14-Dec-08 21:53 
GeneralRe: help in erasing the part of string Pin
tasumisra14-Dec-08 22:15
tasumisra14-Dec-08 22:15 
QuestionDangling pointers and incorrect data being written Pin
Mustafa Ismail Mustafa14-Dec-08 20:02
Mustafa Ismail Mustafa14-Dec-08 20:02 
AnswerRe: Dangling pointers and incorrect data being written Pin
Cedric Moonen14-Dec-08 20:48
Cedric Moonen14-Dec-08 20:48 
GeneralRe: Dangling pointers and incorrect data being written Pin
Mustafa Ismail Mustafa14-Dec-08 21:11
Mustafa Ismail Mustafa14-Dec-08 21:11 
GeneralRe: Dangling pointers and incorrect data being written Pin
Stuart Dootson14-Dec-08 21:31
professionalStuart Dootson14-Dec-08 21:31 
GeneralRe: Dangling pointers and incorrect data being written Pin
Mustafa Ismail Mustafa14-Dec-08 21:42
Mustafa Ismail Mustafa14-Dec-08 21:42 
GeneralRe: Dangling pointers and incorrect data being written Pin
Stuart Dootson14-Dec-08 22:07
professionalStuart Dootson14-Dec-08 22:07 
Looking at your code, m_Settings and m_BlockData in CacheBlock are certainly iffy. You copy pointers to these items, but I suspect you should really copy the contents. Especially when (from the Simulator::CreateCacheBlocks code) it looks like all your cache-blocks will be sharing the same block data with your current implementation.

Memory management in C++ certainly can be a pain - that's why I try to always use objects that manage it for you, such as std::vectors or Boost shared pointers/shared arrays[^].
GeneralRe: Dangling pointers and incorrect data being written Pin
Mustafa Ismail Mustafa15-Dec-08 1:43
Mustafa Ismail Mustafa15-Dec-08 1:43 
GeneralRe: Dangling pointers and incorrect data being written Pin
Stuart Dootson15-Dec-08 13:37
professionalStuart Dootson15-Dec-08 13:37 
GeneralRe: Dangling pointers and incorrect data being written Pin
Mustafa Ismail Mustafa16-Dec-08 18:21
Mustafa Ismail Mustafa16-Dec-08 18:21 
GeneralRe: Dangling pointers and incorrect data being written Pin
Stuart Dootson16-Dec-08 19:40
professionalStuart Dootson16-Dec-08 19:40 
GeneralRe: Dangling pointers and incorrect data being written Pin
Mustafa Ismail Mustafa16-Dec-08 19:50
Mustafa Ismail Mustafa16-Dec-08 19:50 
GeneralRe: Dangling pointers and incorrect data being written Pin
Stuart Dootson16-Dec-08 21:52
professionalStuart Dootson16-Dec-08 21:52 
GeneralRe: Dangling pointers and incorrect data being written Pin
Mustafa Ismail Mustafa16-Dec-08 23:50
Mustafa Ismail Mustafa16-Dec-08 23:50 
GeneralRe: Dangling pointers and incorrect data being written Pin
Stuart Dootson17-Dec-08 2:34
professionalStuart Dootson17-Dec-08 2:34 
GeneralRe: Dangling pointers and incorrect data being written Pin
Mustafa Ismail Mustafa17-Dec-08 4:47
Mustafa Ismail Mustafa17-Dec-08 4:47 
GeneralRe: Dangling pointers and incorrect data being written Pin
Stuart Dootson17-Dec-08 5:18
professionalStuart Dootson17-Dec-08 5:18 
GeneralRe: Dangling pointers and incorrect data being written [modified] Pin
Mustafa Ismail Mustafa17-Dec-08 5:52
Mustafa Ismail Mustafa17-Dec-08 5:52 
GeneralRe: Dangling pointers and incorrect data being written Pin
Stuart Dootson17-Dec-08 6:25
professionalStuart Dootson17-Dec-08 6:25 
GeneralRe: Dangling pointers and incorrect data being written Pin
Mustafa Ismail Mustafa17-Dec-08 6:35
Mustafa Ismail Mustafa17-Dec-08 6:35 
GeneralRe: Dangling pointers and incorrect data being written Pin
Mustafa Ismail Mustafa14-Dec-08 21:12
Mustafa Ismail Mustafa14-Dec-08 21:12 
GeneralRe: Dangling pointers and incorrect data being written Pin
Mustafa Ismail Mustafa14-Dec-08 21:26
Mustafa Ismail Mustafa14-Dec-08 21:26 
QuestionDevelop CSP in XP Pin
izyani14-Dec-08 19:48
izyani14-Dec-08 19:48 
QuestionUsing Queue Timers...... Pin
shaina223114-Dec-08 19:22
shaina223114-Dec-08 19:22 

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.