Click here to Skip to main content
16,015,706 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: CMapPtrToPtr Pin
Michael Dunn2-Dec-03 9:25
sitebuilderMichael Dunn2-Dec-03 9:25 
GeneralSTL threading problem Pin
Josh Gray30-Nov-03 11:42
Josh Gray30-Nov-03 11:42 
GeneralRe: STL threading problem Pin
Jörgen Sigvardsson30-Nov-03 12:04
Jörgen Sigvardsson30-Nov-03 12:04 
GeneralRe: STL threading problem Pin
John M. Drescher1-Dec-03 14:19
John M. Drescher1-Dec-03 14:19 
GeneralRe: STL threading problem Pin
Josh Gray1-Dec-03 16:03
Josh Gray1-Dec-03 16:03 
Generalwsnprintf() method __defined_.h_file Pin
derik_konark29-Nov-03 23:50
derik_konark29-Nov-03 23:50 
GeneralType of Control Pane Pin
Danis Solovyov27-Nov-03 22:33
sussDanis Solovyov27-Nov-03 22:33 
Generalvector question Pin
Steve Messer27-Nov-03 10:11
Steve Messer27-Nov-03 10:11 
I am using a vector to hold a list of pointers that are newed in the start element handler of the Expat parser. Everything works fine until I exit the application and run my cleanup function.

The following code appears to fail or at least produces a memory leak.

Button *pButton; // pure virtual
vector<button*> vButtons; // holds list of created buttons

// from start handler

pButton = new Label( c_Label );
vButtons.push_back( pButton );


// Cleanup

if( count > 0 )
{
vector<button*>::iterator itClean;

for (itClean = vButtons.begin(); itClean != vButtons.end(); ++itClean)
{
delete *itClean; // crashes here everytime
}
vButtons.clear();
}

Any idea why this is leaking?

-Steve
GeneralRe: vector question Pin
Christian Graus27-Nov-03 10:19
protectorChristian Graus27-Nov-03 10:19 
GeneralRe: vector question Pin
Steve Messer27-Nov-03 11:02
Steve Messer27-Nov-03 11:02 
GeneralRe: vector question Pin
Christian Graus27-Nov-03 11:40
protectorChristian Graus27-Nov-03 11:40 
GeneralRe: vector question Pin
Steve Messer27-Nov-03 12:19
Steve Messer27-Nov-03 12:19 
GeneralRe: vector question Pin
Steve Messer27-Nov-03 14:09
Steve Messer27-Nov-03 14:09 
GeneralRe: vector question Pin
Christian Graus27-Nov-03 15:08
protectorChristian Graus27-Nov-03 15:08 
GeneralRe: vector question Pin
Steve Messer27-Nov-03 15:36
Steve Messer27-Nov-03 15:36 
GeneralRe: vector question Pin
Joaquín M López Muñoz30-Nov-03 11:30
Joaquín M López Muñoz30-Nov-03 11:30 
GeneralRe: vector question Pin
Steve Messer1-Dec-03 7:03
Steve Messer1-Dec-03 7:03 
GeneralRe: vector question Pin
Joaquín M López Muñoz1-Dec-03 10:06
Joaquín M López Muñoz1-Dec-03 10:06 
GeneralRe: vector question Pin
Steve Messer1-Dec-03 11:37
Steve Messer1-Dec-03 11:37 
GeneralRe: vector question Pin
zhao wei4-Dec-03 20:41
zhao wei4-Dec-03 20:41 
GeneralRe: vector question Pin
Steve Messer5-Dec-03 10:10
Steve Messer5-Dec-03 10:10 
GeneralRe: vector question Pin
WREY9-Dec-03 4:16
WREY9-Dec-03 4:16 
GeneralRe: vector question Pin
Steve Messer9-Dec-03 6:11
Steve Messer9-Dec-03 6:11 
GeneralCCheckListBox and CListBoxImpl Pin
bryces26-Nov-03 20:05
bryces26-Nov-03 20:05 
GeneralRe: CCheckListBox and CListBoxImpl Pin
coge26-Nov-03 22:13
coge26-Nov-03 22: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.