Click here to Skip to main content
15,938,507 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 2:03
George_George1-Apr-08 2:03 
GeneralRe: auto_ptr array Pin
CPallini1-Apr-08 2:17
mveCPallini1-Apr-08 2:17 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 2:22
George_George1-Apr-08 2:22 
GeneralRe: auto_ptr array Pin
CPallini1-Apr-08 2:28
mveCPallini1-Apr-08 2:28 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 2:54
George_George1-Apr-08 2:54 
GeneralRe: auto_ptr array Pin
CPallini1-Apr-08 3:01
mveCPallini1-Apr-08 3:01 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 3:16
George_George1-Apr-08 3:16 
GeneralRe: auto_ptr array Pin
CPallini1-Apr-08 4:09
mveCPallini1-Apr-08 4:09 
George_George wrote:
I think your code will have memory leak potentially? Because delete other than delete[] will work on the array?

The delete syntax will be used (insted of the delete [] one).
About potential memory leaks, from MSDN [^]

The following two cases produce undefined results: using the array form of delete (delete [ ]) on an object and using the nonarray form of delete on an array.

Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke


GeneralRe: auto_ptr array Pin
George_George1-Apr-08 4:19
George_George1-Apr-08 4:19 
GeneralRe: auto_ptr array Pin
led mike1-Apr-08 4:24
led mike1-Apr-08 4:24 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 4:37
George_George1-Apr-08 4:37 
GeneralRe: auto_ptr array Pin
led mike1-Apr-08 5:07
led mike1-Apr-08 5:07 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 19:38
George_George1-Apr-08 19:38 
GeneralRe: auto_ptr array Pin
led mike2-Apr-08 5:01
led mike2-Apr-08 5:01 
GeneralRe: auto_ptr array Pin
George_George2-Apr-08 23:38
George_George2-Apr-08 23:38 
JokeRe: auto_ptr array Pin
Cedric Moonen1-Apr-08 4:40
Cedric Moonen1-Apr-08 4:40 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 19:40
George_George1-Apr-08 19:40 
GeneralRe: auto_ptr array [modified] Pin
CPallini1-Apr-08 4:47
mveCPallini1-Apr-08 4:47 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 19:37
George_George1-Apr-08 19:37 
QuestionRe: auto_ptr array Pin
CPallini1-Apr-08 21:10
mveCPallini1-Apr-08 21:10 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 21:16
George_George1-Apr-08 21:16 
GeneralRe: auto_ptr array Pin
CPallini1-Apr-08 21:40
mveCPallini1-Apr-08 21:40 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 22:29
George_George1-Apr-08 22:29 
GeneralRe: auto_ptr array Pin
CPallini1-Apr-08 22:47
mveCPallini1-Apr-08 22:47 
GeneralRe: auto_ptr array Pin
George_George1-Apr-08 23:02
George_George1-Apr-08 23:02 

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.