Click here to Skip to main content
15,917,808 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: CtreeCtrl Pin
valikac13-Nov-03 9:15
valikac13-Nov-03 9:15 
GeneralRe: CtreeCtrl Pin
Member 42425913-Nov-03 18:28
Member 42425913-Nov-03 18:28 
QuestionPreferred size for memory block alloc? Pin
Dominik Reichl12-Nov-03 22:58
Dominik Reichl12-Nov-03 22:58 
AnswerRe: Preferred size for memory block alloc? Pin
Anand Paranjpe12-Nov-03 23:49
Anand Paranjpe12-Nov-03 23:49 
GeneralRe: Preferred size for memory block alloc? Pin
Dominik Reichl13-Nov-03 1:16
Dominik Reichl13-Nov-03 1:16 
GeneralRe: Preferred size for memory block alloc? Pin
David Crow13-Nov-03 4:17
David Crow13-Nov-03 4:17 
GeneralRe: Preferred size for memory block alloc? Pin
Dominik Reichl13-Nov-03 4:26
Dominik Reichl13-Nov-03 4:26 
GeneralRe: Preferred size for memory block alloc? Pin
David Crow13-Nov-03 5:27
David Crow13-Nov-03 5:27 
That's fine. I was just trying to ascertain whether you could minimize the impact on the memory manager. One idea, which is how MFC's CString class works, is to only reallocate when necessary. Something like:

char *pBuffer;
int amount_currently_allocated = 0;
 
while (...)
{
    amount_needed = ???;
 
    if (amount_needed > amount_currently_allocated)
    {
        delete [] pBuffer;
        pBuffer = new char[amount_needed];
        amount_currently_allocated = amount_needed;
    }
 
    ...
}



Five birds are sitting on a fence.
Three of them decide to fly off.
How many are left?

GeneralRe: Preferred size for memory block alloc? Pin
Dominik Reichl13-Nov-03 7:33
Dominik Reichl13-Nov-03 7:33 
GeneralTCP Problem Pin
graham the programmmer12-Nov-03 22:24
graham the programmmer12-Nov-03 22:24 
GeneralRe: TCP Problem Pin
Alexander M.,13-Nov-03 8:05
Alexander M.,13-Nov-03 8:05 
QuestionHow to Catch or Retries processes before Task Manager. Pin
Anonymous12-Nov-03 22:03
Anonymous12-Nov-03 22:03 
AnswerRe: How to Catch or Retries processes before Task Manager. Pin
Peter Molnar13-Nov-03 14:10
Peter Molnar13-Nov-03 14:10 
QuestionCBrush::CreatePatternBrush limitations? Pin
CodeBrain12-Nov-03 21:52
CodeBrain12-Nov-03 21:52 
AnswerRe: CBrush::CreatePatternBrush limitations? Pin
Mike Dimmick13-Nov-03 3:17
Mike Dimmick13-Nov-03 3:17 
GeneralRe: CBrush::CreatePatternBrush limitations? Pin
CodeBrain13-Nov-03 3:31
CodeBrain13-Nov-03 3:31 
QuestionHow can I Enable Drag&Drop of IE URL's in my prog Pin
PlasmaJam12-Nov-03 21:51
PlasmaJam12-Nov-03 21:51 
GeneralNew Fonts for VC++ 6 Pin
dushkin12-Nov-03 21:29
dushkin12-Nov-03 21:29 
GeneralGetting MIME Format Pin
derzellner12-Nov-03 20:38
derzellner12-Nov-03 20:38 
Generalcrystalreport date field. Pin
murali_utr12-Nov-03 20:31
murali_utr12-Nov-03 20:31 
GeneralRe: crystalreport date field. Pin
Steve S12-Nov-03 22:49
Steve S12-Nov-03 22:49 
QuestionStop large loop in run time? Pin
closecall12-Nov-03 18:56
closecall12-Nov-03 18:56 
AnswerRe: Stop large loop in run time? Pin
Dominik Reichl12-Nov-03 23:00
Dominik Reichl12-Nov-03 23:00 
AnswerRe: Stop large loop in run time? Pin
Alexander M.,13-Nov-03 8:13
Alexander M.,13-Nov-03 8:13 
GeneralUsing matlab symbolic equation in Visual Studio 6.0 Pin
Member 69647712-Nov-03 17:46
Member 69647712-Nov-03 17:46 

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.