Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
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 
That suggests that the function will allocate the string for you, so you don't need to do it, probably just free it (of course that depends on that 3rd party library). So like this:
void this_is_the_function(...)
{
  char *czTagGetVal = NULL;
  
  glg_animation[iPage].viewport.GetResource("\\Tag\\String",&czTagGetVal);
  sTagName = (CString)czTagGetVal;  
  //Deallocate memory pointed by czTagGetVal????
  ...
}

Be careful with freeing up memory allocated by 3rd party things because if you don't do the de-allocation that is in pair with the allocation you can get unpredictable results.
> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> //TODO: Implement signature here<

GeneralRe: How to delete char Array-Memory leak detection Pin
Stefan_Lang20-Jul-11 1:21
Stefan_Lang20-Jul-11 1:21 
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 
AnswerRe: How to open and read/write from multiple serial ports at the same time? Pin
Code-o-mat17-Jul-11 20:50
Code-o-mat17-Jul-11 20:50 
GeneralRe: How to open and read/write from multiple serial ports at the same time? Pin
Le@rner17-Jul-11 20:56
Le@rner17-Jul-11 20:56 
GeneralRe: How to open and read/write from multiple serial ports at the same time? Pin
Code-o-mat17-Jul-11 21:36
Code-o-mat17-Jul-11 21:36 
GeneralRe: How to open and read/write from multiple serial ports at the same time? Pin
Le@rner17-Jul-11 21:38
Le@rner17-Jul-11 21:38 
GeneralRe: How to open and read/write from multiple serial ports at the same time? Pin
Code-o-mat17-Jul-11 21:52
Code-o-mat17-Jul-11 21:52 
GeneralRe: How to open and read/write from multiple serial ports at the same time? Pin
Le@rner17-Jul-11 22:05
Le@rner17-Jul-11 22:05 
GeneralRe: How to open and read/write from multiple serial ports at the same time? Pin
Code-o-mat17-Jul-11 22:35
Code-o-mat17-Jul-11 22:35 
GeneralMessage Removed Pin
16-Dec-11 0:14
Le@rner16-Dec-11 0:14 
GeneralRe: How to open and read/write from multiple serial ports at the same time? Pin
Code-o-mat16-Dec-11 0:29
Code-o-mat16-Dec-11 0:29 
Questionarray declaration Pin
Danzy8317-Jul-11 10:17
Danzy8317-Jul-11 10:17 
AnswerRe: array declaration Pin
Richard Andrew x6417-Jul-11 10:47
professionalRichard Andrew x6417-Jul-11 10:47 
GeneralRe: array declaration [modified] Pin
Danzy8317-Jul-11 11:56
Danzy8317-Jul-11 11:56 
GeneralRe: array declaration Pin
Richard Andrew x6417-Jul-11 13:45
professionalRichard Andrew x6417-Jul-11 13:45 
GeneralRe: array declaration Pin
Richard MacCutchan17-Jul-11 22:59
mveRichard MacCutchan17-Jul-11 22: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.