Click here to Skip to main content
15,900,254 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDetect available ODBC data sources? Pin
Roland E.29-Aug-04 0:09
Roland E.29-Aug-04 0:09 
AnswerRe: Detect available ODBC data sources? Pin
JimmyRopes29-Aug-04 5:04
professionalJimmyRopes29-Aug-04 5:04 
Question"Small" bug in CSimpleArray ??? Pin
Ernesto D.28-Aug-04 22:47
Ernesto D.28-Aug-04 22:47 
AnswerRe: "Small" bug in CSimpleArray ??? Pin
Neville Franks28-Aug-04 23:54
Neville Franks28-Aug-04 23:54 
GeneralRe: "Small" bug in CSimpleArray ??? Pin
Ernesto D.29-Aug-04 9:47
Ernesto D.29-Aug-04 9:47 
GeneralRe: "Small" bug in CSimpleArray ??? Pin
Neville Franks29-Aug-04 10:56
Neville Franks29-Aug-04 10:56 
GeneralRe: "Small" bug in CSimpleArray ??? Pin
Ernesto D.30-Aug-04 22:02
Ernesto D.30-Aug-04 22:02 
AnswerReal world example (try it if you wish) Pin
Ernesto D.29-Aug-04 9:38
Ernesto D.29-Aug-04 9:38 
heres another example, this one ibe just created as a normal Win32 console app, and included afx.h and atlbase.h to my stdafx.h.
Ibe just compiled & executed this, and got the same leak

// leak.cpp : Defines the entry point for the console application.
#include "stdafx.h"

class CClass
{
public:
CClass(){}
CClass(const CClass& rv) { m_member=rv.m_member;}
const CClass& operator=(const CClass& rv){m_member=rv.m_member; return *this;}
CString m_member;
};

int main(int argc, char* argv[])
{
CClass c1;
CClass c2;
c1.m_member="ABC";
c2.m_member="DEF";
CSimpleArray<CClass> arr;
arr.Add(c1);
arr.Add(c2);
arr.RemoveAt(1);
return 0;
}

the results (in debug window) after program exits are:
Detected memory leaks!
Dumping objects ->
strcore.cpp(118) : {44} normal block at 0x003E2498, 16 bytes long.
Data: < DEF > 01 00 00 00 03 00 00 00 03 00 00 00 44 45 46 00
Object dump complete.

as a side note, if you remove the item at position 0 of the array instead of 1, then tere is no leak. this IS a bug in CSimpleArray isnt it?
GeneralRe: Real world example (try it if you wish) Pin
Neville Franks31-Aug-04 10:09
Neville Franks31-Aug-04 10:09 
GeneralRe: Real world example (try it if you wish) Pin
Ernesto D.1-Sep-04 13:19
Ernesto D.1-Sep-04 13:19 
GeneralISAPI Filter wont load when i add OnSendRawData notification Pin
raed28-Aug-04 22:26
raed28-Aug-04 22:26 
Generalgenadi Pin
genadi28-Aug-04 21:21
genadi28-Aug-04 21:21 
Generalgenadi Pin
genadi28-Aug-04 21:17
genadi28-Aug-04 21:17 
GeneralHowto detect keyboard language change Pin
Ivan Cachicatari28-Aug-04 19:12
Ivan Cachicatari28-Aug-04 19:12 
GeneralRe: Howto detect keyboard language change Pin
Michael Dunn28-Aug-04 20:02
sitebuilderMichael Dunn28-Aug-04 20:02 
GeneralRe: Howto detect keyboard language change Pin
Ivan Cachicatari28-Aug-04 20:32
Ivan Cachicatari28-Aug-04 20:32 
GeneralRe: Howto detect keyboard language change Pin
Michael Dunn28-Aug-04 21:44
sitebuilderMichael Dunn28-Aug-04 21:44 
GeneralRe: Howto detect keyboard language change Pin
Ivan Cachicatari29-Aug-04 10:45
Ivan Cachicatari29-Aug-04 10:45 
Generaldifferent objects share global parameters Pin
impeham28-Aug-04 14:12
impeham28-Aug-04 14:12 
GeneralAllowing a Template Function to access a private variables in a class. Pin
Supaflyfrank28-Aug-04 12:49
Supaflyfrank28-Aug-04 12:49 
GeneralRe: Allowing a Template Function to access a private variables in a class. Pin
kfaday28-Aug-04 13:16
kfaday28-Aug-04 13:16 
Questiondetect if download? Pin
Larsson28-Aug-04 12:45
Larsson28-Aug-04 12:45 
AnswerRe: detect if download? Pin
valikac28-Aug-04 16:24
valikac28-Aug-04 16:24 
GeneralRe: detect if download? Pin
Larsson29-Aug-04 7:00
Larsson29-Aug-04 7:00 
AnswerRe: detect if download? Pin
David Crow30-Aug-04 4:56
David Crow30-Aug-04 4:56 

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.