Click here to Skip to main content
15,912,504 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
AnswerRe: Destroying map cause exception Pin
Zac Howland11-Aug-06 8:43
Zac Howland11-Aug-06 8:43 
QuestionMS WORD Dictionary for Web Page???????? Pin
MANOJ BATRA8-Aug-06 19:21
MANOJ BATRA8-Aug-06 19:21 
QuestionDestructors in STL? Pin
sawerr8-Aug-06 19:19
sawerr8-Aug-06 19:19 
AnswerRe: Destructors in STL? Pin
Christian Graus8-Aug-06 19:53
protectorChristian Graus8-Aug-06 19:53 
GeneralRe: Destructors in STL? Pin
Anonymuos11-Aug-06 8:37
Anonymuos11-Aug-06 8:37 
AnswerRe: Destructors in STL? Pin
sunit510-Aug-06 22:52
sunit510-Aug-06 22:52 
GeneralRe: Destructors in STL? [modified] Pin
George L. Jackson11-Aug-06 18:01
George L. Jackson11-Aug-06 18:01 
AnswerRe: Destructors in STL? Pin
dfields32617-Aug-06 10:24
dfields32617-Aug-06 10:24 
<br />
Use auto_ptr<> will delete them for you<br />
#include <memory><br />
<br />
using std::wcout;<br />
using std::endl;<br />
using std::vector;<br />
<br />
class Foo<br />
{<br />
public:<br />
    Foo(int index) : m_index(index)<br />
    {<br />
        wcout << L"Creating Foo #" << m_index << endl;<br />
    }<br />
<br />
    ~Foo()<br />
    {<br />
        wcout << L"Destroying Foo #" << m_index << endl;<br />
    }<br />
private:<br />
    int m_index;<br />
};<br />
<br />
int _tmain(int argc, _TCHAR* argv[])<br />
{<br />
    vector< std::auto_ptr< Foo* > > pFooList;<br />
    <br />
    for (int i = 0; i < 10; ++i)<br />
    {<br />
        pFooList.push_back( std::auto_ptr< Foo* >(new Foo(i)));    <br />
    }<br />
<br />
/* no need to delete, std::auto_ptr takes care if it for you.<br />
//see #include<memory><br />
     for (int i = 0; i < 10; ++i)<br />
    {<br />
        delete pFooList[i];<br />
    }<br />
*/<br />
<br />
    return 0;<br />
}<br />

Cool | :cool:
Answerstd::auto_ptr in containers [modified] Pin
George L. Jackson17-Aug-06 11:47
George L. Jackson17-Aug-06 11:47 
GeneralCode Using boost::shared_ptr Pin
George L. Jackson17-Aug-06 12:07
George L. Jackson17-Aug-06 12:07 
GeneralRe: Destructors in STL? Pin
Zac Howland25-Aug-06 8:59
Zac Howland25-Aug-06 8:59 
AnswerRe: Destructors in STL? Pin
Zac Howland11-Aug-06 4:40
Zac Howland11-Aug-06 4:40 
QuestionCalling m_spClientSite->GetContainer from another thread Pin
TClarke8-Aug-06 3:34
TClarke8-Aug-06 3:34 
QuestionDEBUG_NEW for ATL apps? Pin
Rob Caldecott7-Aug-06 5:49
Rob Caldecott7-Aug-06 5:49 
AnswerRe: DEBUG_NEW for ATL apps? Pin
Michael Dunn7-Aug-06 7:41
sitebuilderMichael Dunn7-Aug-06 7:41 
GeneralRe: DEBUG_NEW for ATL apps? Pin
Rob Caldecott7-Aug-06 7:50
Rob Caldecott7-Aug-06 7:50 
GeneralRe: DEBUG_NEW for ATL apps? Pin
Michael Dunn7-Aug-06 8:14
sitebuilderMichael Dunn7-Aug-06 8:14 
GeneralRe: DEBUG_NEW for ATL apps? Pin
Jörgen Sigvardsson8-Aug-06 20:47
Jörgen Sigvardsson8-Aug-06 20:47 
AnswerRe: DEBUG_NEW for ATL apps? [modified] Pin
Stuart Dootson7-Aug-06 21:24
professionalStuart Dootson7-Aug-06 21:24 
GeneralRe: DEBUG_NEW for ATL apps? Pin
Rob Caldecott7-Aug-06 21:57
Rob Caldecott7-Aug-06 21:57 
GeneralRe: DEBUG_NEW for ATL apps? Pin
Stuart Dootson8-Aug-06 0:05
professionalStuart Dootson8-Aug-06 0:05 
QuestionFileMaker Pro Pin
khwo6-Aug-06 20:59
khwo6-Aug-06 20:59 
AnswerRe: FileMaker Pro Pin
User 2155976-Aug-06 21:34
User 2155976-Aug-06 21:34 
Questionstl containers allocation in heap or stack? Pin
sawerr4-Aug-06 12:44
sawerr4-Aug-06 12:44 
AnswerRe: stl containers allocation in heap or stack? Pin
Jörgen Sigvardsson4-Aug-06 13:14
Jörgen Sigvardsson4-Aug-06 13:14 

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.