Click here to Skip to main content
16,010,650 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralMatrix dimensions Pin
MFC is the Best7-Oct-02 22:22
MFC is the Best7-Oct-02 22:22 
GeneralRe: Matrix dimensions Pin
jmkhael7-Oct-02 22:32
jmkhael7-Oct-02 22:32 
GeneralRe: Matrix dimensions Pin
MFC is the Best8-Oct-02 21:32
MFC is the Best8-Oct-02 21:32 
GeneralRe: Matrix dimensions Pin
Roger Allen8-Oct-02 0:18
Roger Allen8-Oct-02 0:18 
GeneralProblem with <map> memory allocation Pin
fordge7-Oct-02 20:55
fordge7-Oct-02 20:55 
GeneralRe: Problem with <map> memory allocation Pin
Joaquín M López Muñoz7-Oct-02 20:59
Joaquín M López Muñoz7-Oct-02 20:59 
GeneralRe: Problem with <map> memory allocation Pin
fordge7-Oct-02 21:11
fordge7-Oct-02 21:11 
GeneralRe: Problem with <map> memory allocation Pin
Joe Woodbury7-Oct-02 21:39
professionalJoe Woodbury7-Oct-02 21:39 
For verifying memory leaks, BoundsChecker is the best tool I've used (though it does have it's own annoying quirks and isn't updated as much as I would like, it's also relatively expensive.) VC++ has built in memory leak detection, though it's lousy at actually pinpointing the offending objects. Refer to the documentation.

The current behavior is actually desireable. Were the C++ heap to reduce the memory used with every deallocation, your program would slow measurably.

If you plan on allocating large amounts of memory temporarily, you can use the GlobalAlloc functions (I believe in STL you can write your own allocators, but I'm not well enough acquainted with STL to tell you the details.)

Remember that in Win32, memory is virtualized. If unused, the memory will likely be swapped to disk and will be retrieved when accessed (you don't need to worry about it.) As was pointed out earlier, use perfmon to watch memory usage over time. Watch for continual increasing slopes (also avoid looking at the first few seconds of a program--I've had several programs where you needed to ignore the first five to ten minutes since they looked just like memory leaks.)


GeneralRe: Problem with <map> memory allocation Pin
Joaquín M López Muñoz7-Oct-02 21:50
Joaquín M López Muñoz7-Oct-02 21:50 
GeneralRe: Problem with <map> memory allocation Pin
fordge7-Oct-02 21:59
fordge7-Oct-02 21:59 
GeneralRe: Problem with <map> memory allocation Pin
jhwurmbach7-Oct-02 22:34
jhwurmbach7-Oct-02 22:34 
GeneralWrong icons (enabled/disabled) in the command bar! Pin
Daniel Strigl7-Oct-02 20:27
Daniel Strigl7-Oct-02 20:27 
GeneralBatch file (*.BAT) Pin
Jerome Conus7-Oct-02 20:24
Jerome Conus7-Oct-02 20:24 
GeneralRe: Batch file (*.BAT) Pin
jmkhael7-Oct-02 22:38
jmkhael7-Oct-02 22:38 
GeneralRe: Batch file (*.BAT) Pin
Mike Nordell8-Oct-02 4:41
Mike Nordell8-Oct-02 4:41 
GeneralRe: Batch file (*.BAT) Pin
JT Anderson8-Oct-02 12:32
JT Anderson8-Oct-02 12:32 
GeneralRe: Batch file (*.BAT) Pin
Jerome Conus8-Oct-02 19:10
Jerome Conus8-Oct-02 19:10 
QuestionUpdateResource in Win95/98/ME? Pin
Henry P.7-Oct-02 18:48
Henry P.7-Oct-02 18:48 
AnswerRe: UpdateResource in Win95/98/ME? Pin
Joaquín M López Muñoz7-Oct-02 20:42
Joaquín M López Muñoz7-Oct-02 20:42 
GeneralRe: UpdateResource in Win95/98/ME? Pin
Henry P.8-Oct-02 10:01
Henry P.8-Oct-02 10:01 
GeneralCPropertyPage Help Pin
Richard Lewis7-Oct-02 18:43
Richard Lewis7-Oct-02 18:43 
GeneralRe: CPropertyPage Help Pin
Shog97-Oct-02 19:27
sitebuilderShog97-Oct-02 19:27 
GeneralRe: CPropertyPage Help Pin
Richard Lewis7-Oct-02 23:47
Richard Lewis7-Oct-02 23:47 
GeneralRe: CPropertyPage Help Pin
Shog98-Oct-02 3:32
sitebuilderShog98-Oct-02 3:32 
Questionrest of procedure? Pin
imran_rafique7-Oct-02 17:37
imran_rafique7-Oct-02 17:37 

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.