Click here to Skip to main content
15,894,460 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CSting ASCII to decimal Number Pin
azhari2419-Jul-11 5:57
azhari2419-Jul-11 5:57 
Questionfixing vc6 installation Pin
John R. Shaw18-Jul-11 13:39
John R. Shaw18-Jul-11 13:39 
AnswerRe: fixing vc6 installation Pin
_AnsHUMAN_ 18-Jul-11 18:16
_AnsHUMAN_ 18-Jul-11 18:16 
AnswerRe: fixing vc6 installation Pin
Richard MacCutchan18-Jul-11 21:11
mveRichard MacCutchan18-Jul-11 21:11 
GeneralRe: fixing vc6 installation Pin
John R. Shaw19-Jul-11 4:11
John R. Shaw19-Jul-11 4:11 
GeneralRe: fixing vc6 installation Pin
Richard MacCutchan19-Jul-11 6:09
mveRichard MacCutchan19-Jul-11 6:09 
GeneralRe: fixing vc6 installation Pin
Rolf Kristensen27-Jul-11 12:22
Rolf Kristensen27-Jul-11 12:22 
Questionvcredist_x86.exe Pin
RomTibi18-Jul-11 4:52
RomTibi18-Jul-11 4:52 
AnswerRe: vcredist_x86.exe Pin
Rajesh R Subramanian18-Jul-11 5:40
professionalRajesh R Subramanian18-Jul-11 5:40 
GeneralRe: vcredist_x86.exe Pin
RomTibi18-Jul-11 5:47
RomTibi18-Jul-11 5:47 
QuestionError while fetching null value Pin
Pranit Kothari18-Jul-11 1:02
Pranit Kothari18-Jul-11 1:02 
AnswerRe: Error while fetching null value Pin
dasblinkenlight18-Jul-11 2:44
dasblinkenlight18-Jul-11 2:44 
Questionproblem in setting font to CComboBox in XP? Pin
yogish29317-Jul-11 23:55
yogish29317-Jul-11 23:55 
AnswerRe: problem in setting font to CComboBox in XP? Pin
«_Superman_»18-Jul-11 3:57
professional«_Superman_»18-Jul-11 3:57 
GeneralRe: problem in setting font to CComboBox in XP? Pin
yogish29318-Jul-11 20:41
yogish29318-Jul-11 20:41 
QuestionHow to delete char Array-Memory leak detection Pin
Anu_Bala17-Jul-11 20:55
Anu_Bala17-Jul-11 20:55 
AnswerRe: How to delete char Array-Memory leak detection Pin
CPallini17-Jul-11 21:36
mveCPallini17-Jul-11 21:36 
AnswerRe: How to delete char Array-Memory leak detection Pin
Code-o-mat17-Jul-11 21:55
Code-o-mat17-Jul-11 21:55 
GeneralRe: How to delete char Array-Memory leak detection Pin
Anu_Bala17-Jul-11 22:14
Anu_Bala17-Jul-11 22:14 
GeneralRe: How to delete char Array-Memory leak detection Pin
Code-o-mat17-Jul-11 22:31
Code-o-mat17-Jul-11 22:31 
GeneralRe: How to delete char Array-Memory leak detection Pin
Anu_Bala17-Jul-11 22:39
Anu_Bala17-Jul-11 22:39 
GeneralRe: How to delete char Array-Memory leak detection Pin
Code-o-mat17-Jul-11 22:47
Code-o-mat17-Jul-11 22:47 
GeneralRe: How to delete char Array-Memory leak detection Pin
Stefan_Lang20-Jul-11 1:21
Stefan_Lang20-Jul-11 1:21 
Judging by that function signature, GetResource will either allocate a string for you, or return a pointer to a string it stores internally (or statically). In either case, the pointer you pass will be overwritten, and any memory previously allocated that this pointer used to point to will be lost!

So, what you should do is:

1. do not allocate memory yourself!
2. initialize the pointer with NULL instead, before calling GetResource()
3. Check the documentation of GetResource() whether or not it allocates memory that needs to be freed or not. If your delete causes an error, then most likely it shouldn't be deleted, or it already gets deleted by whoever manages these resources.
AnswerRe: How to delete char Array-Memory leak detection Pin
Albert Holguin18-Jul-11 5:31
professionalAlbert Holguin18-Jul-11 5:31 
QuestionHow to open and read/write from multiple serial ports at the same time? Pin
Le@rner17-Jul-11 20:42
Le@rner17-Jul-11 20:42 

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.