Click here to Skip to main content
15,921,793 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: problem with "new" Pin
Zac Howland17-Aug-06 10:13
Zac Howland17-Aug-06 10:13 
GeneralRe: problem with "new" Pin
led mike17-Aug-06 10:30
led mike17-Aug-06 10:30 
GeneralRe: problem with "new" Pin
Zac Howland17-Aug-06 10:35
Zac Howland17-Aug-06 10:35 
GeneralRe: problem with "new" Pin
Wheatbread17-Aug-06 10:54
Wheatbread17-Aug-06 10:54 
GeneralRe: problem with "new" Pin
wbasheer17-Aug-06 17:16
wbasheer17-Aug-06 17:16 
GeneralRe: problem with "new" Pin
Zac Howland17-Aug-06 19:31
Zac Howland17-Aug-06 19:31 
GeneralRe: problem with "new" Pin
Wheatbread18-Aug-06 1:30
Wheatbread18-Aug-06 1:30 
GeneralRe: problem with "new" Pin
Zac Howland18-Aug-06 3:31
Zac Howland18-Aug-06 3:31 
Methods like GetInstance are usually used in the singleton pattern, in which case all constructors for the object are private and you keep a pointer to the instance in the class itself (if it is null, you create a new one, otherwise you just return the pointer to the object that already exists).

Fixing that, however, will not fix the problem you are seeing. Knowing that you are loading/unloading the DLL constantly, my guess is that somewhere you create the object, the DLL is unloaded (thereby releasing any memory it had allocated and invalidating it), and then you declare a character array that happens to get the same address.

If you decide to become a software engineer, you are signing up to have a 1/2" piece of silicon tell you exactly how stupid you really are for 8 hours a day, 5 days a week

Zac

QuestionHow to know whether a file is saved or not Pin
napoleaninlondon17-Aug-06 9:27
napoleaninlondon17-Aug-06 9:27 
AnswerRe: How to know whether a file is saved or not Pin
led mike17-Aug-06 9:42
led mike17-Aug-06 9:42 
GeneralRe: How to know whether a file is saved or not Pin
napoleaninlondon17-Aug-06 9:51
napoleaninlondon17-Aug-06 9:51 
GeneralRe: How to know whether a file is saved or not Pin
Maximilien17-Aug-06 10:13
Maximilien17-Aug-06 10:13 
GeneralRe: How to know whether a file is saved or not Pin
Waldermort17-Aug-06 12:07
Waldermort17-Aug-06 12:07 
GeneralRe: How to know whether a file is saved or not Pin
led mike17-Aug-06 10:24
led mike17-Aug-06 10:24 
GeneralRe: How to know whether a file is saved or not Pin
Jijo.Raj17-Aug-06 14:55
Jijo.Raj17-Aug-06 14:55 
GeneralRe: How to know whether a file is saved or not Pin
Hamid_RT18-Aug-06 6:43
Hamid_RT18-Aug-06 6:43 
QuestionLPTSTR to char* Pin
georgekjolly17-Aug-06 6:51
georgekjolly17-Aug-06 6:51 
AnswerRe: LPTSTR to char* Pin
led mike17-Aug-06 6:55
led mike17-Aug-06 6:55 
QuestionRe: LPTSTR to char* Pin
David Crow17-Aug-06 6:55
David Crow17-Aug-06 6:55 
AnswerRe: LPTSTR to char* Pin
Zac Howland17-Aug-06 6:57
Zac Howland17-Aug-06 6:57 
Questionc++ Pin
jon-8017-Aug-06 6:05
professionaljon-8017-Aug-06 6:05 
AnswerRe: c++ Pin
Zac Howland17-Aug-06 6:13
Zac Howland17-Aug-06 6:13 
GeneralRe: c++ Pin
jon-8017-Aug-06 8:02
professionaljon-8017-Aug-06 8:02 
GeneralRe: c++ Pin
Zac Howland17-Aug-06 8:16
Zac Howland17-Aug-06 8:16 
GeneralRe: c++ Pin
jon-8018-Aug-06 9:01
professionaljon-8018-Aug-06 9:01 

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.