Click here to Skip to main content
14,599,444 members

C / C++ / MFC

 
GeneralRe: Problem with pointers memory allocation on the same memory area Pin
Richard MacCutchan24-May-20 23:19
mveRichard MacCutchan24-May-20 23:19 
GeneralRe: Problem with pointers memory allocation on the same memory area Pin
Member 95950801-Jun-20 20:36
MemberMember 95950801-Jun-20 20:36 
AnswerRe: Problem with pointers memory allocation on the same memory area Pin
phil.o25-May-20 0:21
mvephil.o25-May-20 0:21 
GeneralRe: Problem with pointers memory allocation on the same memory area Pin
Richard MacCutchan25-May-20 0:31
mveRichard MacCutchan25-May-20 0:31 
GeneralRe: Problem with pointers memory allocation on the same memory area Pin
Member 959508025-May-20 1:25
MemberMember 959508025-May-20 1:25 
GeneralRe: Problem with pointers memory allocation on the same memory area Pin
phil.o25-May-20 1:36
mvephil.o25-May-20 1:36 
GeneralRe: Problem with pointers memory allocation on the same memory area Pin
Richard MacCutchan25-May-20 1:46
mveRichard MacCutchan25-May-20 1:46 
AnswerRe: Problem with pointers memory allocation on the same memory area Pin
Member 95950801-Jun-20 20:42
MemberMember 95950801-Jun-20 20:42 
Thank you all for your help.

The example code is very close to the actual code and the problem is that sometimes, depending on the computer, because of the operator >> to deserialize the style m_pFont, several m_pFont pointed to the same memory area.

I studied the problem with a minimal grid ... and finally realized that in my application I was not using this m_pFont. I modified my code so that I would no longer use it at all, destroy it and set it to NULL which definitively resolved my problem.

If I don't fully explain the phenomenon, I think it comes from the fact that these m_pFont contained the same data and that the operators << consider the pointer had already been serialized as explained in the TN002: Persistent Object Data Format | Microsoft Docs ... Maybe ...

Regards
QuestionPrinting With Crystal Report Pin
a_alise21-May-20 11:09
Membera_alise21-May-20 11:09 
AnswerRe: Printing With Crystal Report Pin
_Flaviu22-May-20 0:12
Member_Flaviu22-May-20 0:12 
QuestionDynamic Created CEdit using CreateEx Pin
Beginner_mfc20-May-20 3:48
MemberBeginner_mfc20-May-20 3:48 
AnswerRe: Dynamic Created CEdit using CreateEx Pin
Richard MacCutchan20-May-20 5:06
mveRichard MacCutchan20-May-20 5:06 
AnswerRe: Dynamic Created CEdit using CreateEx Pin
Victor Nijegorodov20-May-20 6:42
MemberVictor Nijegorodov20-May-20 6:42 
QuestionC++ Pin
Member 1461181419-May-20 5:46
MemberMember 1461181419-May-20 5:46 
AnswerRe: C++ Pin
Greg Utas19-May-20 6:08
professionalGreg Utas19-May-20 6:08 
GeneralRe: C++ Pin
Richard MacCutchan19-May-20 6:13
mveRichard MacCutchan19-May-20 6:13 
AnswerRe: C++ Pin
CPallini19-May-20 20:50
mveCPallini19-May-20 20:50 
GeneralRe: C++ Pin
charlieg20-May-20 2:13
Membercharlieg20-May-20 2:13 
GeneralRe: C++ Pin
CPallini20-May-20 2:16
mveCPallini20-May-20 2:16 
GeneralRe: C++ Pin
charlieg20-May-20 2:23
Membercharlieg20-May-20 2:23 
GeneralRe: C++ Pin
CPallini20-May-20 3:48
mveCPallini20-May-20 3:48 
GeneralRe: C++ Pin
charlieg20-May-20 4:46
Membercharlieg20-May-20 4:46 
GeneralRe: C++ Pin
CPallini20-May-20 4:59
mveCPallini20-May-20 4:59 
GeneralRe: C++ Pin
charlieg20-May-20 6:35
Membercharlieg20-May-20 6:35 
QuestionC++ Pin
Member 1461181419-May-20 4:18
MemberMember 1461181419-May-20 4:18 

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.