Click here to Skip to main content
15,896,269 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralAbout serial communication Pin
maggiet21-Apr-03 17:49
maggiet21-Apr-03 17:49 
GeneralRe: About serial communication Pin
John R. Shaw22-Apr-03 18:33
John R. Shaw22-Apr-03 18:33 
GeneralScope of typedef Pin
Makover21-Apr-03 17:42
Makover21-Apr-03 17:42 
GeneralRe: Scope of typedef Pin
Phil Hamer22-Apr-03 13:18
Phil Hamer22-Apr-03 13:18 
GeneralRe: Scope of typedef Pin
John R. Shaw22-Apr-03 18:51
John R. Shaw22-Apr-03 18:51 
GeneralListBox Pin
hurley21-Apr-03 16:47
hurley21-Apr-03 16:47 
GeneralRe: ListBox Pin
Joan M21-Apr-03 21:43
professionalJoan M21-Apr-03 21:43 
GeneralCStringArray problem! Pin
Miguel Lopes21-Apr-03 15:54
Miguel Lopes21-Apr-03 15:54 
Hi. I have a CMapWordToPtr object, the pointers in the CMap point to CStringArray.

The problem is, when i want to empty the cmap i don't free the memory. By MS documentation CStringArray::RemoveAt or RemoveALL should be enough, but it doesn't seem to work:


--------------------------
CMapWordToPtr *MyMap

...blablabla...

int size,i;
word key:
CStringArray *MyArray;
void *temp;
POSITION p=MyMap->GetStartPosition();
while(p){
MyMap->GetNextAssoc(p,key,temp);
MyArray= (CStringArray) temp;
size=MyArray->GetSize();
for(i=0;i<size;i++){
myarray-="">RemoveAt(0);
MyArray->FreeExtra();
}
}
MyMap->RemoveAll();


...blablabla
--------------------------

It's a major memory leak, I've tried a lot of ways and only managed to bang my head to the wall.
GeneralRe: CStringArray problem! Pin
Phil Hamer22-Apr-03 13:22
Phil Hamer22-Apr-03 13:22 
GeneralShellExecute Pin
John L. DeVito21-Apr-03 15:12
professionalJohn L. DeVito21-Apr-03 15:12 
GeneralRe: ShellExecute Pin
Toni7821-Apr-03 16:20
Toni7821-Apr-03 16:20 
GeneralRe: ShellExecute Pin
Rickard Andersson2021-Apr-03 20:17
Rickard Andersson2021-Apr-03 20:17 
GeneralRe: ShellExecute Pin
David Crow22-Apr-03 5:41
David Crow22-Apr-03 5:41 
GeneralTemplate question in C++ Pin
grscot21-Apr-03 11:36
grscot21-Apr-03 11:36 
GeneralRe: Template question in C++ Pin
Alvaro Mendez21-Apr-03 12:07
Alvaro Mendez21-Apr-03 12:07 
GeneralRe: Template question in C++ Pin
Anonymous21-Apr-03 12:23
Anonymous21-Apr-03 12:23 
GeneralRe: Template question in C++ Pin
Joaquín M López Muñoz21-Apr-03 19:56
Joaquín M López Muñoz21-Apr-03 19:56 
GeneralRe: Template question in C++ Pin
Alvaro Mendez22-Apr-03 18:33
Alvaro Mendez22-Apr-03 18:33 
GeneralRe: Template question in C++ Pin
Joaquín M López Muñoz22-Apr-03 19:53
Joaquín M López Muñoz22-Apr-03 19:53 
GeneralCompact Database Pin
Toni7821-Apr-03 11:24
Toni7821-Apr-03 11:24 
GeneralCDialogBar - maixized width when docked Pin
sändi21-Apr-03 11:19
sändi21-Apr-03 11:19 
GeneralLost resources again... Pin
CherezZaboro21-Apr-03 11:11
CherezZaboro21-Apr-03 11:11 
GeneralRe: Lost resources again... Pin
Brian Shifrin21-Apr-03 11:48
Brian Shifrin21-Apr-03 11:48 
GeneralRe: Lost resources again... Pin
CherezZaboro24-Apr-03 6:43
CherezZaboro24-Apr-03 6:43 
GeneralCopying folders to another device Pin
Stefan Spenz21-Apr-03 9:13
Stefan Spenz21-Apr-03 9:13 

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.