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

C / C++ / MFC

 
AnswerRe: Parsing a integer value as a Parameter Pin
David Crow24-Oct-06 8:43
David Crow24-Oct-06 8:43 
GeneralRe: Parsing a integer value as a Parameter Pin
Phoenix10124-Oct-06 21:26
Phoenix10124-Oct-06 21:26 
AnswerRe: Parsing a integer value as a Parameter Pin
Nemanja Trifunovic24-Oct-06 9:39
Nemanja Trifunovic24-Oct-06 9:39 
QuestionA simple question about memory reallocation Pin
pani6824-Oct-06 8:25
pani6824-Oct-06 8:25 
AnswerRe: A simple question about memory reallocation Pin
David Crow24-Oct-06 8:29
David Crow24-Oct-06 8:29 
AnswerRe: A simple question about memory reallocation Pin
Mark Salsbery24-Oct-06 8:44
Mark Salsbery24-Oct-06 8:44 
AnswerRe: A simple question about memory reallocation Pin
Zac Howland24-Oct-06 10:57
Zac Howland24-Oct-06 10:57 
AnswerRe: A simple question about memory reallocation Pin
cmk24-Oct-06 11:25
cmk24-Oct-06 11:25 
Keep using malloc/realloc/free, for POD's you get no gain from using new/delete.

I'm surprised by David's aversion to realloc, he's usually so sensible. Smile | :)
I'm sure he realizes that vector has to do the same thing as realloc using new/delete, but much less efficiently. Just look through the vector/xmemory header files.

The next step up from malloc/realloc/free, for your case, would be to alloc your own heap (via HeapCreate) and use HeapReAlloc (which takes a flag that will zero expanded memory).

The next step up from that would be to alloc/manage your own virtual memory block. This is the method preferred by people into self-flagellation.


...cmk

Save the whales - collect the whole set

GeneralRe: A simple question about memory reallocation Pin
Zac Howland24-Oct-06 11:36
Zac Howland24-Oct-06 11:36 
GeneralRe: A simple question about memory reallocation Pin
cmk25-Oct-06 6:11
cmk25-Oct-06 6:11 
GeneralRe: A simple question about memory reallocation Pin
Zac Howland25-Oct-06 6:28
Zac Howland25-Oct-06 6:28 
GeneralRe: A simple question about memory reallocation Pin
cmk25-Oct-06 8:10
cmk25-Oct-06 8:10 
GeneralRe: A simple question about memory reallocation Pin
Zac Howland25-Oct-06 8:35
Zac Howland25-Oct-06 8:35 
QuestionText does not show on toolbar Pin
peterchen24-Oct-06 7:35
peterchen24-Oct-06 7:35 
AnswerRe: Text does not show on toolbar Pin
Mark Salsbery24-Oct-06 7:59
Mark Salsbery24-Oct-06 7:59 
GeneralRe: Text does not show on toolbar Pin
peterchen24-Oct-06 13:02
peterchen24-Oct-06 13:02 
GeneralRe: Text does not show on toolbar Pin
Mark Salsbery24-Oct-06 13:14
Mark Salsbery24-Oct-06 13:14 
Questionnavigation for vectorRichEditBox Pin
prithaa24-Oct-06 7:11
prithaa24-Oct-06 7:11 
AnswerRe: navigation for vectorRichEditBox Pin
prithaa24-Oct-06 7:18
prithaa24-Oct-06 7:18 
GeneralRe: navigation for vectorRichEditBox Pin
prithaa24-Oct-06 7:25
prithaa24-Oct-06 7:25 
QuestionRe: navigation for vectorRichEditBox Pin
Maximilien24-Oct-06 7:58
Maximilien24-Oct-06 7:58 
AnswerRe: navigation for vectorRichEditBox Pin
prithaa24-Oct-06 8:11
prithaa24-Oct-06 8:11 
GeneralRe: navigation for vectorRichEditBox Pin
Mark Salsbery24-Oct-06 8:28
Mark Salsbery24-Oct-06 8:28 
AnswerRe: navigation for vectorRichEditBox Pin
David Crow24-Oct-06 8:32
David Crow24-Oct-06 8:32 
GeneralRe: navigation for vectorRichEditBox Pin
prithaa24-Oct-06 9:50
prithaa24-Oct-06 9:50 

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.