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

C / C++ / MFC

 
GeneralRunning Visual C++ executable files in OS/2 Pin
JekYu3-Apr-03 19:39
JekYu3-Apr-03 19:39 
QuestionHow to persist data in a DLL Pin
Ph@ntom3-Apr-03 19:31
Ph@ntom3-Apr-03 19:31 
GeneralWindow title and Complete applicaiton Path Pin
Saqib Razzaq3-Apr-03 18:45
Saqib Razzaq3-Apr-03 18:45 
GeneralRe: Window title and Complete applicaiton Path Pin
KarstenK3-Apr-03 21:28
mveKarstenK3-Apr-03 21:28 
GeneralRe: Window title and Complete applicaiton Path Pin
Cedric Moonen3-Apr-03 21:41
Cedric Moonen3-Apr-03 21:41 
GeneralWindows disabling dialogs after WM_QUIT Pin
Kibble3-Apr-03 16:40
Kibble3-Apr-03 16:40 
Generalrealted to new operator. Pin
anju3-Apr-03 16:39
anju3-Apr-03 16:39 
GeneralRe: realted to new operator. Pin
Dave Bryant3-Apr-03 16:52
Dave Bryant3-Apr-03 16:52 
anju wrote:
typedef auto_ptr pSample;

I assume you meant: typedef auto_ptr<CSample> pSample;

The auto_ptr is a small structure that holds the pointer to the object, and a flag indicating whether or not it owns the object (it does by default). In it's destructor, it deletes the object if it owns it. This can greatly simplify memory management, as these smart pointers take care of deleting themselves when they go out of scope.

In terms of efficiency, the auto_ptr would be every so slightly less efficient, but we are probably talking literally one or two CPU instructions, so it is really irrelevant.

Dave
http://www.cloudsofheaven.org
GeneralRe: realted to new operator. Pin
Chintan3-Apr-03 18:01
Chintan3-Apr-03 18:01 
GeneralRe: realted to new operator. Pin
Dave Bryant3-Apr-03 18:06
Dave Bryant3-Apr-03 18:06 
GeneralRe: realted to new operator. Pin
Chintan3-Apr-03 18:34
Chintan3-Apr-03 18:34 
GeneralRe: realted to new operator. Pin
Dave Bryant3-Apr-03 18:37
Dave Bryant3-Apr-03 18:37 
GeneralRe: realted to new operator. Pin
Chintan3-Apr-03 19:01
Chintan3-Apr-03 19:01 
GeneralRe: realted to new operator. Pin
nde_plume4-Apr-03 5:08
nde_plume4-Apr-03 5:08 
GeneralProblem with wincrypt.h Pin
Nick Parker3-Apr-03 16:19
protectorNick Parker3-Apr-03 16:19 
GeneralRe: Problem with wincrypt.h Pin
Zdeslav Vojkovic4-Apr-03 0:33
Zdeslav Vojkovic4-Apr-03 0:33 
GeneralRe: Problem with wincrypt.h Pin
jhwurmbach4-Apr-03 1:30
jhwurmbach4-Apr-03 1:30 
GeneralRe: Problem with wincrypt.h Pin
Zdeslav Vojkovic6-Apr-03 21:07
Zdeslav Vojkovic6-Apr-03 21:07 
GeneralRe: Problem with wincrypt.h Pin
Nick Parker4-Apr-03 3:27
protectorNick Parker4-Apr-03 3:27 
Generalerror RC2135: file not found: MENU Pin
ElizabethC3-Apr-03 13:07
ElizabethC3-Apr-03 13:07 
QuestionCan not find the Dialog resource from .NET Pin
ElizabethC3-Apr-03 12:52
ElizabethC3-Apr-03 12:52 
GeneralCString and WriteFile Pin
andyg.1013-Apr-03 11:39
andyg.1013-Apr-03 11:39 
GeneralRe: CString and WriteFile Pin
John R. Shaw3-Apr-03 12:43
John R. Shaw3-Apr-03 12:43 
GeneralRe: CString and WriteFile Pin
Chintan3-Apr-03 18:46
Chintan3-Apr-03 18:46 
GeneralRe: CString and WriteFile Pin
Joan M3-Apr-03 22:14
professionalJoan M3-Apr-03 22: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.