Click here to Skip to main content
15,918,706 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: can't open library file Pin
David Crow19-Feb-08 3:14
David Crow19-Feb-08 3:14 
QuestionGDI+ issue Pin
trioum18-Feb-08 23:14
trioum18-Feb-08 23:14 
GeneralRe: GDI+ issue Pin
Sameerkumar Namdeo18-Feb-08 23:29
Sameerkumar Namdeo18-Feb-08 23:29 
GeneralRe: GDI+ issue Pin
trioum19-Feb-08 0:22
trioum19-Feb-08 0:22 
GeneralRe: GDI+ issue Pin
Mark Salsbery19-Feb-08 8:08
Mark Salsbery19-Feb-08 8:08 
GeneralRe: GDI+ issue Pin
trioum19-Feb-08 18:09
trioum19-Feb-08 18:09 
Questionwhen to call auto_ptr release? Pin
George_George18-Feb-08 22:36
George_George18-Feb-08 22:36 
AnswerRe: when to call auto_ptr release? [modified] Pin
Rajkumar R18-Feb-08 23:36
Rajkumar R18-Feb-08 23:36 
George_George wrote:
But why do we sometimes need to call release method on auto_ptr to go back to the style of manual management?


it is the flexibility to disassociate the memory object without deleting, and that is the reason we need to handle its deletion,

a simple use case of producer and consumer. just for example

void producer::loop()
{
   while (!exitEvent())
   {
      auto_ptr<data> pi(produce());
      if (waitForExitorConsumeEvent())
      {
         if(ConsumeEvent())
         {
          consumer.consume(pi.release()) 
          // get the object from auto_ptr without deleting it
          // consumer will take care of deleting it
          // otherwise autoptr
         }
      }
   }
}


modified on Tuesday, February 19, 2008 7:42 AM

GeneralRe: when to call auto_ptr release? Pin
George_George19-Feb-08 14:12
George_George19-Feb-08 14:12 
AnswerRe: when to call auto_ptr release? Pin
Rajkumar R19-Feb-08 17:34
Rajkumar R19-Feb-08 17:34 
GeneralRe: when to call auto_ptr release? Pin
George_George19-Feb-08 23:31
George_George19-Feb-08 23:31 
AnswerRe: when to call auto_ptr release? Pin
jhwurmbach19-Feb-08 4:35
jhwurmbach19-Feb-08 4:35 
GeneralRe: when to call auto_ptr release? Pin
George_George19-Feb-08 14:05
George_George19-Feb-08 14:05 
Generalerror while importing the static class member from dll Pin
Prasanth M V18-Feb-08 21:23
Prasanth M V18-Feb-08 21:23 
Generalerror while importing the static class member from dll Pin
Prasanth M V18-Feb-08 21:23
Prasanth M V18-Feb-08 21:23 
GeneralRe: error while importing the static class member from dll Pin
Iain Clarke, Warrior Programmer18-Feb-08 21:50
Iain Clarke, Warrior Programmer18-Feb-08 21:50 
GeneralRe: error while importing the static class member from dll Pin
Prasanth M V18-Feb-08 22:00
Prasanth M V18-Feb-08 22:00 
QuestionRe: error while importing the static class member from dll Pin
CPallini18-Feb-08 22:08
mveCPallini18-Feb-08 22:08 
GeneralRe: error while importing the static class member from dll Pin
Prasanth M V18-Feb-08 22:24
Prasanth M V18-Feb-08 22:24 
GeneralRe: error while importing the static class member from dll Pin
Rajesh R Subramanian18-Feb-08 22:35
professionalRajesh R Subramanian18-Feb-08 22:35 
GeneralRe: error while importing the static class member from dll Pin
Prasanth M V18-Feb-08 23:42
Prasanth M V18-Feb-08 23:42 
QuestionRe: error while importing the static class member from dll Pin
CPallini18-Feb-08 22:38
mveCPallini18-Feb-08 22:38 
GeneralRe: error while importing the static class member from dll Pin
Prasanth M V19-Feb-08 0:07
Prasanth M V19-Feb-08 0:07 
AnswerRe: error while importing the static class member from dll [modified] Pin
Rajkumar R19-Feb-08 0:15
Rajkumar R19-Feb-08 0:15 
Questionvfw.h and capDlgVideoDisplay Pin
Tomice18-Feb-08 21:05
Tomice18-Feb-08 21:05 

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.